class TraversableStringTest

Hierarchy

Expanded class hierarchy of TraversableStringTest

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Util/TraversableStringTest.php, line 16

Namespace

Assetic\Test\Util
View source
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);
  }

}

Members