Clinner\Command\Tests\CommandTest::testConstructorWithValues PHP Метод

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

    public function testConstructorWithValues()
    {
        $name = 'command-name';
        $args = array('first' => 'value');
        $opts = array('delimiter' => '?');
        $command = $this->getMockBuilder('\\Clinner\\Command\\Command')->disableOriginalConstructor()->setMethods(array('setName', 'setArguments', 'setOptions'))->getMock();
        $command->expects($this->once())->method('setName')->with($this->equalTo($name))->will($this->returnSelf());
        $command->expects($this->once())->method('setArguments')->with($this->equalTo($args))->will($this->returnSelf());
        $command->expects($this->once())->method('setOptions')->with($this->equalTo($opts))->will($this->returnSelf());
        $command->__construct($name, $args, $opts);
    }