Permalink
Browse files

Tests (un)extending views

  • Loading branch information...
1 parent 9c14ed7 commit 0caf90fffad7ef866eb6a8e7d0ce65696fedb482 @ewinslow ewinslow committed Dec 13, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 engine/tests/phpunit/ElggViewServiceTest.php
@@ -0,0 +1,16 @@
+<?php
+
+class ElggViewServiceTest extends PHPUnit_Framework_TestCase {
+
+ public function testCanExtendViews() {
+ $views = new ElggViewService();
+
+ $views->extendView('foo', 'bar');
+
+ // Unextending valid extension succeeds.
+ $this->assertTrue($views->unextendView('foo', 'bar'));
+
+ // Unextending non-existent extension "fails."
+ $this->assertFalse($views->unextendView('foo', 'bar'));
+ }
+}

0 comments on commit 0caf90f

Please sign in to comment.