Blame view

sources/3rdparty/kriswallsmith/assetic/tests/Assetic/Test/Util/TraversableStringTest.php 823 Bytes
6d9380f96   Cédric Dupont   Update sources OC...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  <?php
  
  /*
   * This file is part of the Assetic package, an OpenSky project.
   *
   * (c) 2010-2014 OpenSky Project Inc
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   */
  
  namespace Assetic\Test\Util;
  
  use Assetic\Util\TraversableString;
  
  class TraversableStringTest extends \PHPUnit_Framework_TestCase
  {
      public function testString()
      {
          $foo = new TraversableString('foo', array('foo', 'bar'));
          $this->assertEquals('foo', (string) $foo);
      }
  
      public function testArray()
      {
          $foo = new TraversableString('foo', array('foo', 'bar'));
  
          $values = array();
          foreach ($foo as $value) {
              $values[] = $value;
          }
  
          $this->assertEquals(array('foo', 'bar'), $values);
      }
  }