diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-04 17:50:34 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-04 17:50:34 +0200 |
commit | 46b77928f746a4231d064774b5b67fd892c7ce86 (patch) | |
tree | e3ea690b3f0def1744ddae758923cf92171ef985 /vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php | |
parent | 68abd9c71b1d2f7bb2e9d21819584d1d15005b25 (diff) | |
download | wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.tar.gz wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.tar.zst wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.zip |
rm vendor
Diffstat (limited to 'vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php')
-rw-r--r-- | vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php b/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php deleted file mode 100644 index 2b84e4fd..00000000 --- a/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; | ||
13 | |||
14 | use Symfony\Component\Form\FormEvent; | ||
15 | use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; | ||
16 | |||
17 | class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase | ||
18 | { | ||
19 | protected function setUp() | ||
20 | { | ||
21 | if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) { | ||
22 | $this->markTestSkipped('The "EventDispatcher" component is not available'); | ||
23 | } | ||
24 | } | ||
25 | |||
26 | public function testFixHttpUrl() | ||
27 | { | ||
28 | $data = "www.symfony.com"; | ||
29 | $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); | ||
30 | $event = new FormEvent($form, $data); | ||
31 | |||
32 | $filter = new FixUrlProtocolListener('http'); | ||
33 | $filter->onSubmit($event); | ||
34 | |||
35 | $this->assertEquals('http://www.symfony.com', $event->getData()); | ||
36 | } | ||
37 | |||
38 | public function testSkipKnownUrl() | ||
39 | { | ||
40 | $data = "http://www.symfony.com"; | ||
41 | $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); | ||
42 | $event = new FormEvent($form, $data); | ||
43 | |||
44 | $filter = new FixUrlProtocolListener('http'); | ||
45 | $filter->onSubmit($event); | ||
46 | |||
47 | $this->assertEquals('http://www.symfony.com', $event->getData()); | ||
48 | } | ||
49 | |||
50 | public function testSkipOtherProtocol() | ||
51 | { | ||
52 | $data = "ftp://www.symfony.com"; | ||
53 | $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); | ||
54 | $event = new FormEvent($form, $data); | ||
55 | |||
56 | $filter = new FixUrlProtocolListener('http'); | ||
57 | $filter->onSubmit($event); | ||
58 | |||
59 | $this->assertEquals('ftp://www.symfony.com', $event->getData()); | ||
60 | } | ||
61 | } | ||