StorageTest.php 678 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Templating\Tests\Storage;
  11. use Symfony\Component\Templating\Storage\Storage;
  12. class StorageTest extends \PHPUnit_Framework_TestCase
  13. {
  14. public function testMagicToString()
  15. {
  16. $storage = new TestStorage('foo');
  17. $this->assertEquals('foo', (string) $storage, '__toString() returns the template name');
  18. }
  19. }
  20. class TestStorage extends Storage
  21. {
  22. public function getContent()
  23. {
  24. }
  25. }