Make sure we just check for the keys
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
d690f90928
commit
48679ae39f
|
@ -123,11 +123,11 @@ class EntityTest extends \Test\TestCase {
|
||||||
public function testSetterMarksFieldUpdated() {
|
public function testSetterMarksFieldUpdated() {
|
||||||
$this->entity->setId(3);
|
$this->entity->setId(3);
|
||||||
|
|
||||||
$this->assertContains('id', $this->entity->getUpdatedFields());
|
$this->assertContains('id', array_keys($this->entity->getUpdatedFields()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function testCallShouldOnlyWorkForGetterSetter() {
|
public function testCallShouldOnlyWorkForGetterSetter() {
|
||||||
$this->expectException(\BadFunctionCallException::class);
|
$this->expectException(\BadFunctionCallException::class);
|
||||||
|
|
||||||
|
@ -135,14 +135,14 @@ class EntityTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function testGetterShouldFailIfAttributeNotDefined() {
|
public function testGetterShouldFailIfAttributeNotDefined() {
|
||||||
$this->expectException(\BadFunctionCallException::class);
|
$this->expectException(\BadFunctionCallException::class);
|
||||||
|
|
||||||
$this->entity->getTest();
|
$this->entity->getTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testSetterShouldFailIfAttributeNotDefined() {
|
public function testSetterShouldFailIfAttributeNotDefined() {
|
||||||
$this->expectException(\BadFunctionCallException::class);
|
$this->expectException(\BadFunctionCallException::class);
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ class EntityTest extends \Test\TestCase {
|
||||||
$this->assertThat($entity->isAnotherBool(), new IsType(IsType::TYPE_BOOL));
|
$this->assertThat($entity->isAnotherBool(), new IsType(IsType::TYPE_BOOL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testIsGetterShoudFailForOtherType() {
|
public function testIsGetterShoudFailForOtherType() {
|
||||||
$this->expectException(\BadFunctionCallException::class);
|
$this->expectException(\BadFunctionCallException::class);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue