public function matches($argument) { if (get_class($this->expected) !== get_class($argument)) { return false; } $actualAttributes = Arrays::filterByAllowedKeys($argument->attributes(), $this->expected->getFields()); return $this->expectedAttributes == $actualAttributes; }
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 '); }