Exemplo n.º 1
0
 public function testUserCanExtendWithCustomFunctions()
 {
     Arrays::extend('fooify', function ($array) {
         return 'bar';
     });
     $this->assertEquals('bar', Arrays::fooify(array('foo')));
     String::extend('unfooer', function ($string) {
         return String::replace($string, 'foo', 'bar');
     });
     $this->assertEquals('bar', String::unfooer('foo'));
 }
Exemplo n.º 2
0
 public function testCanUseCorrectOrderForStrReplace()
 {
     $string = String::replace('foo', 'foo', 'bar');
     $this->assertEquals('bar', $string);
 }