mageekguy\atoum\tests\units\test\adapter::testHasPreviousCalls PHP Méthode

testHasPreviousCalls() public méthode

        public function testHasPreviousCalls()
        {
            $this->if($calls = new \mock\mageekguy\atoum\test\adapter\calls())->and($this->calling($calls)->hasPrevious = $has = (bool) rand(0, 1))->and($adapter = new testedClass())->and($adapter->setCalls($calls))->then->boolean($adapter->hasPreviousCalls($call = new call('md5'), $position = rand(1, PHP_INT_MAX)))->isEqualTo($has)->mock($calls)->call('hasPrevious')->withArguments($call, $position, false)->once()->boolean($adapter->hasPreviousCalls($call = new call('md5'), $position = rand(1, PHP_INT_MAX), true))->isEqualTo($has)->mock($calls)->call('hasPrevious')->withArguments($call, $position, true)->once();
        }