11<?php
2+ /*
3+ * This file is part of the Ekino Wordpress package.
4+ *
5+ * (c) 2013 Ekino
6+ *
7+ * For the full copyright and license information, please view the LICENSE
8+ * file that was distributed with this source code.
9+ */
210
311namespace Ekino \WordpressBundle \Tests \Event \Subscriber \I18n ;
412
513use Ekino \WordpressBundle \Event \Subscriber \I18n \I18nSubscriber ;
614
15+ /**
16+ * Class RequestSubscriberTest
17+ */
718class RequestSubscriberTest extends \PHPUnit_Framework_TestCase
819{
920 protected $ defaultLanguage ;
@@ -14,6 +25,9 @@ class RequestSubscriberTest extends \PHPUnit_Framework_TestCase
1425 */
1526 protected $ subscriber ;
1627
28+ /**
29+ * Sets up a I18nSubscriber instance
30+ */
1731 protected function setUp ()
1832 {
1933 $ this ->defaultLanguage = 'fr ' ;
@@ -22,11 +36,17 @@ protected function setUp()
2236 $ this ->subscriber = new I18nSubscriber ($ this ->defaultLanguage , $ this ->cookieName );
2337 }
2438
39+ /**
40+ * Tests static getSubscribedEvents() method
41+ */
2542 public function testGetSubscribedEvents ()
2643 {
2744 $ this ->assertInternalType ('array ' , I18nSubscriber::getSubscribedEvents ());
2845 }
2946
47+ /**
48+ * Tests onKernelRequest() method when no cookies are existing
49+ */
3050 public function testOnKernelRequestNoExisingCookie ()
3151 {
3252 $ event = $ this ->getMockBuilder ('Symfony\Component\HttpKernel\Event\GetResponseEvent ' )->disableOriginalConstructor ()->getMock ();
@@ -63,6 +83,9 @@ public function testOnKernelRequestNoExisingCookie()
6383 $ this ->subscriber ->onKernelRequest ($ event );
6484 }
6585
86+ /**
87+ * Tests onKernelRequest() method
88+ */
6689 public function testOnKernelRequest ()
6790 {
6891 $ event = $ this ->getMockBuilder ('Symfony\Component\HttpKernel\Event\GetResponseEvent ' )->disableOriginalConstructor ()->getMock ();
0 commit comments