Nelmio\Alice\Definition\MethodCall\SimpleMethodCallTest::testCanCreateANewInstanceWithNoArguments PHP Method

testCanCreateANewInstanceWithNoArguments() public method

    public function testCanCreateANewInstanceWithNoArguments()
    {
        $method = 'setUsername';
        $arguments = null;
        $definition = new SimpleMethodCall($method, $arguments);
        $newArguments = [new \stdClass()];
        $newDefinition = $definition->withArguments($newArguments);
        $this->assertInstanceOf(SimpleMethodCall::class, $newDefinition);
        $this->assertNull($definition->getCaller());
        $this->assertEquals($method, $definition->getMethod());
        $this->assertEquals($arguments, $definition->getArguments());
        $this->assertEquals($method, $definition->__toString());
        $this->assertNull($newDefinition->getCaller());
        $this->assertEquals($method, $newDefinition->getMethod());
        $this->assertEquals($newArguments, $newDefinition->getArguments());
        $this->assertEquals($method, $newDefinition->__toString());
    }