namespace Symfony\Component\PropertyAccess\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException;
use Symfony\Component\PropertyAccess\PropertyPath;
class PropertyPathTest extends TestCase
{ public function testToString() { $path =
new PropertyPath('reference.traversable[index].property'
);
$this->
assertEquals('reference.traversable[index].property',
$path->
__toString());
} public function testDotIsRequiredBeforeProperty() { $this->
expectException(InvalidPropertyPathException::
class);
new PropertyPath('[index]property'
);
} public function testDotCannotBePresentAtTheBeginning() {