| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8101a3c commit a4113da
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,19 +21,21 @@ public function testMakeMethodCreatesValidValidator() | |||
| 21 | 21 | $this->assertEquals(array('baz' => array('boom')), $validator->getRules()); | |
| 22 | 22 | ||
| 23 | 23 | $presence = m::mock('Illuminate\Validation\PresenceVerifierInterface'); | |
| 24 | - $factory->extend('foo', function() {}); | ||
| 25 | - $factory->extendImplicit('implicit', function() {}); | ||
| 24 | + $noop1 = function() {}; | ||
| 25 | + $noop2 = function() {}; | ||
| 26 | + $factory->extend('foo', $noop1); | ||
| 27 | + $factory->extendImplicit('implicit', $noop2); | ||
| 26 | 28 | $factory->setPresenceVerifier($presence); | |
| 27 | 29 | $validator = $factory->make(array(), array()); | |
| 28 | - $this->assertEquals(array('foo' => function() {}, 'implicit' => function() {}), $validator->getExtensions()); | ||
| 30 | + $this->assertEquals(array('foo' => $noop1, 'implicit' => $noop2), $validator->getExtensions()); | ||
| 29 | 31 | $this->assertEquals($presence, $validator->getPresenceVerifier()); | |
| 30 | 32 | ||
| 31 | 33 | $presence = m::mock('Illuminate\Validation\PresenceVerifierInterface'); | |
| 32 | - $factory->extend('foo', function() {}, 'foo!'); | ||
| 33 | - $factory->extendImplicit('implicit', function() {}, 'implicit!'); | ||
| 34 | + $factory->extend('foo', $noop1, 'foo!'); | ||
| 35 | + $factory->extendImplicit('implicit', $noop2, 'implicit!'); | ||
| 34 | 36 | $factory->setPresenceVerifier($presence); | |
| 35 | 37 | $validator = $factory->make(array(), array()); | |
| 36 | - $this->assertEquals(array('foo' => function() {}, 'implicit' => function() {}), $validator->getExtensions()); | ||
| 38 | + $this->assertEquals(array('foo' => $noop1, 'implicit' => $noop2), $validator->getExtensions()); | ||
| 37 | 39 | $this->assertEquals(array('foo' => 'foo!', 'implicit' => 'implicit!'), $validator->getFallbackMessages()); | |
| 38 | 40 | $this->assertEquals($presence, $validator->getPresenceVerifier()); | |
| 39 | 41 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments