aboutsummaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-12-24 08:44:59 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-12-24 08:44:59 +0100
commita1ff879f19ad7e95b06d9a3437e4c9415a7f1011 (patch)
tree9b7e3c7a9bb08f6be2e30a04347633ae804711c6 /Test
parent63f712b244d872f95161831b32cc49dbb61a55df (diff)
downloadUstring-a1ff879f19ad7e95b06d9a3437e4c9415a7f1011.zip
Ustring-a1ff879f19ad7e95b06d9a3437e4c9415a7f1011.tar.gz
Ustring-a1ff879f19ad7e95b06d9a3437e4c9415a7f1011.tar.bz2
Review.2.14.12.24
Thanks @jubianchi!
Diffstat (limited to 'Test')
-rw-r--r--Test/Unit/String.php31
1 files changed, 8 insertions, 23 deletions
diff --git a/Test/Unit/String.php b/Test/Unit/String.php
index 1d81430..3a95b40 100644
--- a/Test/Unit/String.php
+++ b/Test/Unit/String.php
@@ -57,10 +57,7 @@ class String extends Test\Unit\Suite {
->given(
$this->function->function_exists = function ( $name ) {
- if('mb_substr' === $name)
- return false;
-
- return true;
+ return 'mb_substr' !== $name;
}
)
->exception(function ( ) {
@@ -172,10 +169,7 @@ class String extends Test\Unit\Suite {
->given(
$this->function->class_exists = function ( $name ) {
- if('Collator' === $name)
- return false;
-
- return true;
+ return 'Collator' !== $name;
},
$string = new LUT('b')
)
@@ -278,7 +272,7 @@ class String extends Test\Unit\Suite {
->integer($result)
->isEqualTo(0)
->array($matches)
- ->isEqualTo([]);
+ ->isEmpty();
}
public function case_match_with_offset ( ) {
@@ -860,10 +854,7 @@ class String extends Test\Unit\Suite {
->given(
$this->function->class_exists = function ( $name ) {
- if('Normalizer' === $name)
- return false;
-
- return true;
+ return 'Normalizer' !== $name;
},
$string = new LUT('Un été brûlant sur la côte')
)
@@ -880,10 +871,7 @@ class String extends Test\Unit\Suite {
->given(
$this->function->class_exists = function ( $name ) {
- if('Normalizer' === $name)
- return false;
-
- return true;
+ return 'Normalizer' !== $name;
},
$string = new LUT('Un été brûlant sur la côte')
)
@@ -920,13 +908,10 @@ class String extends Test\Unit\Suite {
public function case_toString ( ) {
$this
- ->given(
- $datum = $this->sample($this->realdom->regex('/\w{7,42}/')),
- $string = new LUT($datum)
- )
- ->when($result = (string) $string)
+ ->given($datum = $this->sample($this->realdom->regex('/\w{7,42}/')))
+ ->when($result = new LUT($datum))
->then
- ->string($result)
+ ->castToString($result)
->isEqualTo($datum);
}
}