Skip to content
Browse files

Adding unit tests

  • Loading branch information...
1 parent d303a01 commit 20b1908ae59131d313a3c59d8b0caa01e66023d0 @chdemko committed Jun 27, 2012
Showing with 48 additions and 0 deletions.
  1. +48 −0 tests/suites/unit/JImportTest.php
View
48 tests/suites/unit/JImportTest.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * @package Joomla.UnitTest
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
+ */
+
+/**
+ * Test class for import.php.
+ *
+ * @package Joomla.UnitTest
+ * @since 12.2
+ */
+class JImportTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * Tests the error handler when throwing an ErrorException.
+ *
+ * @return void
+ *
+ * @expectedException ErrorException
+ *
+ * @since 12.2
+ */
+ public function testErrorException()
+ {
+ $a = $b;
+ }
+
+ /**
+ * Tests the error handler when being silent.
+ *
+ * @return void
+ *
+ * @since 12.2
+ */
+ public function testErrorControlOperator()
+ {
+ ob_start();
+ $a = @$b;
+ $out = ob_get_clean();
+ $this->assertThat(
+ $out,
+ $this->equalTo('')
+ );
+ }
+}

0 comments on commit 20b1908

Please sign in to comment.
Something went wrong with that request. Please try again.