public function testReadAccessorsReturnPropertiesValues() { $reference = 'user0'; $className = 'Nelmio\\Alice\\Entity\\User'; $specs = SpecificationBagFactory::create(); $fixture = new SimpleFixture($reference, $className, $specs); $this->assertEquals($reference, $fixture->getId()); $this->assertEquals($className, $fixture->getClassName()); $this->assertEquals($specs, $fixture->getSpecs()); try { $fixture->getValueForCurrent(); $this->fail('Expected exception to be thrown.'); } catch (NoValueForCurrentException $exception) { $this->assertEquals('No value for \'<current()>\' found for the fixture "user0".', $exception->getMessage()); } $fixture = new SimpleFixture($reference, $className, $specs, 'alice'); $this->assertEquals($reference, $fixture->getId()); $this->assertEquals($className, $fixture->getClassName()); $this->assertEquals($specs, $fixture->getSpecs()); $this->assertEquals('alice', $fixture->getValueForCurrent()); }