PhpBench\Tests\Unit\Storage\Driver\Dbal\Visitor\TokenValueVisitorTest::testLatestNotReplaceOtherValues PHP Метод

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

It should not replace values that are not tokens!
    public function testLatestNotReplaceOtherValues()
    {
        $constraint = $this->parser->parse('$and: [ { run: "latest" }, { "run": "foo" } ]');
        $this->uuidResolver->resolve('latest')->willReturn(42);
        $this->uuidResolver->resolve('foo')->willReturn('foo');
        $this->visitor->visit($constraint);
        $constraint1 = $constraint->getConstraint1();
        $constraint2 = $constraint->getConstraint2();
        $this->assertEquals(42, $constraint1->getValue());
        $this->assertEquals('foo', $constraint2->getValue());
    }