namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\Extension\Core\DataTransformer\WeekToArrayTransformer;
class WeekToArrayTransformerTest extends TestCase
{ public function testTransform() { $transformer =
new WeekToArrayTransformer();
$this->
assertSame(['year' => 2019, 'week' => 1
],
$transformer->
transform('2019-W01'
));
} public function testTransformEmpty() { $transformer =
new WeekToArrayTransformer();
$this->
assertSame(['year' => null, 'week' => null
],
$transformer->
transform(null
));
}