Skip to content

Commit 51a21bb

Browse files
committedApr 11, 2012
improved method naming
1 parent 8568fb5 commit 51a21bb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎Entity/ExtendedData.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function isEncryptionRequired($name)
4444
return $this->data[$name][1];
4545
}
4646

47-
public function isPersistRequired($name)
47+
public function mayBePersisted($name)
4848
{
4949
if (!isset($this->data[$name])) {
5050
throw new \InvalidArgumentException(sprintf('There is no data with key "%s".', $name));

‎Tests/Entity/ExtendedDataTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public function testIsEncryptionRequiredThrowsExceptionOnNonExistentKey()
3838
/**
3939
* @expectedException \InvalidArgumentException
4040
*/
41-
public function testIsPersistRequiredThrowsExceptionOnNonExistentKey()
41+
public function testMayBePersistedThrowsExceptionOnNonExistentKey()
4242
{
4343
$extendedData = new ExtendedData;
44-
$extendedData->isPersistRequired('foo');
44+
$extendedData->mayBePersisted('foo');
4545
}
4646

4747
/**
@@ -79,9 +79,9 @@ public function testWithSomeData($name, $value, $encrypt, $persist)
7979
}
8080

8181
if ($persist) {
82-
$this->assertTrue($extendedData->isPersistRequired($name));
82+
$this->assertTrue($extendedData->mayBePersisted($name));
8383
} else {
84-
$this->assertFalse($extendedData->isPersistRequired($name));
84+
$this->assertFalse($extendedData->mayBePersisted($name));
8585
}
8686
}
8787

0 commit comments

Comments
 (0)