Ejemplo n.º 1
0
 public function isEqualTo($array)
 {
     AssertAdapter::assertEquals($array, $this->actual);
 }
Ejemplo n.º 2
0
 public static function verify($mock)
 {
     if (!empty($mock->_called_methods)) {
         AssertAdapter::fail("Expected zero interactions but got " . MethodCall::arrayToString($mock->_called_methods));
     }
 }
Ejemplo n.º 3
0
 private function _validateExceptionThrown()
 {
     if (!$this->exception) {
         AssertAdapter::fail('Exception was not thrown.');
     }
 }
Ejemplo n.º 4
0
 private function _assertSamePersistentAttributes(Model $expected)
 {
     $expectedAttributes = Arrays::filterByAllowedKeys($expected->attributes(), $expected->getFields());
     $actualAttributes = Arrays::filterByAllowedKeys($this->_actual->attributes(), $this->_actual->getFields());
     AssertAdapter::assertEquals($expectedAttributes, $actualAttributes, 'Models have different attributes ');
 }