disableAutoBindForNewMock() публичный статический Метод

public static disableAutoBindForNewMock ( )
Пример #1
0
 /** @php 5.4 */
 public function test__setAndBindToMock()
 {
     $this->if($mockController = new testedClass())->and($mockController->control($mock = new \mock\mageekguy\atoum\tests\units\mock\foo()))->and($mockController->doesSomething = function () use(&$public) {
         $this->public = $public = uniqid();
     })->and($mock->doesSomething())->then->string($mock->public)->isEqualTo($public)->if($mockController = new testedClass())->and($mockController->__construct = function () use(&$public) {
         $this->public = $public = uniqid();
     })->and($mock = new \mock\mageekguy\atoum\tests\units\mock\with__callAndOtherMethods())->then->string($mock->public)->isEqualTo($public)->if($mockController = new testedClass())->and($mockController->__construct = function () use(&$public) {
         $this->public = $public = uniqid();
     })->and($mock = new \mock\mageekguy\atoum\tests\units\mock\with__callAndOtherMethods($mockController))->then->string($mock->public)->isEqualTo($public)->if($mockController->disableAutoBind())->and($mock = new \mock\mageekguy\atoum\tests\units\mock\with__callAndOtherMethods($mockController))->then->variable($mock->public)->isNull()->if(testedClass::disableAutoBindForNewMock())->and($mock = new \mock\mageekguy\atoum\tests\units\mock\with__callAndOtherMethods($mockController))->then->variable($mock->public)->isNull()->if($mockController = new testedClass())->and($mockController->__construct = function () use(&$public) {
         $this->public = $public = uniqid();
     })->and($mockController->enableAutoBind())->and($mock = new \mock\mageekguy\atoum\tests\units\mock\with__callAndOtherMethods($mockController))->then->string($mock->public)->isEqualTo($public);
 }
Пример #2
0
 function beforeTestMethod($method)
 {
     mock\controller::disableAutoBindForNewMock();
     $this->mockGenerator->allIsInterface();
     return parent::beforeTestMethod($method);
 }