. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ namespace tests\unit\Espo\Core\Job; use Espo\Core\Job\Job\Data; class DataTest extends \PHPUnit\Framework\TestCase { public function testData1() { $data = Data ::create((object) ['test' => '1']) ->withTargetId('target-id') ->withTargetType('target-type'); $this->assertEquals('1', $data->get('test')); $this->assertEquals('target-id', $data->getTargetId()); $this->assertEquals('target-type', $data->getTargetType()); } public function testData2() { $data = Data ::create(['test' => '1']); $this->assertEquals('1', $data->get('test')); $this->assertEquals(null, $data->getTargetId()); } }