getValue() публичный Метод

public getValue ( )
Пример #1
0
 public function add(UniqueValue $value)
 {
     $valueId = $value->getId();
     if (false === array_key_exists($valueId, $this->pool)) {
         $this->pool[$valueId] = [];
     }
     $this->pool[$valueId][] = $value->getValue();
 }
Пример #2
0
 public function testImmutableFactories()
 {
     $id = 'Nelmio\\Entity\\User#user0#username';
     $value = new \stdClass();
     $newValue = new \stdClass();
     $newValue->foo = 'bar';
     $original = new UniqueValue($id, $value);
     $clone = $original->withValue($newValue);
     $this->assertInstanceOf(UniqueValue::class, $clone);
     $this->assertEquals($id, $original->getId());
     $this->assertEquals($id, $clone->getId());
     $this->assertEquals($value, $original->getValue());
     $this->assertEquals($newValue, $clone->getValue());
 }
Пример #3
0
 private function generateValue(UniqueValue $value, FixtureInterface $fixture, ResolvedFixtureSet $fixtureSet, array $scope, GenerationContext $context) : array
 {
     $realValue = $value->getValue();
     if ($realValue instanceof ValueInterface) {
         $result = $this->resolver->resolve($value->getValue(), $fixture, $fixtureSet, $scope, $context);
         return [$value->withValue($result->getValue()), $result->getSet()];
     }
     return [$value, $fixtureSet];
 }