Browse Source

Start tests. Ignore other library components.

Frederic G. MARAND 10 years ago
parent
commit
02dc2b7f03

+ 4 - 3
.gitignore

@@ -9,6 +9,7 @@
 # PHP error logs
 php_error*
 
-# Library components
-OSInet
-
+OSInet/Sort
+OSInet/Finite_State_Machine
+OSInet/Open_Document
+OSInet/Testable

+ 67 - 0
OSInet/Class_Grapher/Tests/ClassInstanceTest.php

@@ -0,0 +1,67 @@
+<?php
+namespace OSInet\Class_Grapher;
+
+require_once "misc/psr0.php";
+spl_autoload_register('psr0_autoload');
+
+/**
+ * ClassInstance test case.
+ */
+class ClassInstanceTest extends \PHPUnit_Framework_TestCase {
+
+  /**
+   *
+   * @var ClassInstance
+   */
+  private $ClassInstance;
+
+  /**
+   * Prepares the environment before running a test.
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    // TODO Auto-generated ClassInstanceTest::setUp()
+
+    $this->ClassInstance = new ClassInstance(/* parameters */);
+  }
+
+  /**
+   * Cleans up the environment after running a test.
+   */
+  protected function tearDown() {
+    // TODO Auto-generated ClassInstanceTest::tearDown()
+
+    $this->ClassInstance = null;
+
+    parent::tearDown();
+  }
+
+  /**
+   * Constructs the test case.
+   */
+  public function __construct() {
+    // TODO Auto-generated constructor
+  }
+
+  /**
+   * Tests ClassInstance->__construct()
+   */
+  public function test__construct() {
+    // TODO Auto-generated ClassInstanceTest->test__construct()
+    $this->markTestIncomplete("__construct test not implemented");
+
+    $this->ClassInstance->__construct(/* parameters */);
+  }
+
+  /**
+   * Tests ClassInstance->basicAttributes()
+   */
+  public function testBasicAttributes() {
+    // TODO Auto-generated ClassInstanceTest->testBasicAttributes()
+    $this->markTestIncomplete("basicAttributes test not implemented");
+
+    $this->ClassInstance->basicAttributes(/* parameters */);
+  }
+}
+

+ 170 - 0
OSInet/Class_Grapher/Tests/GraphTest.php

@@ -0,0 +1,170 @@
+<?php
+namespace OSInet\Class_Grapher;
+
+require_once 'OSInet/Class_Grapher/Graph.php';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/**
+ * Graph test case.
+ */
+class GraphTest extends \PHPUnit_Framework_TestCase {
+
+  /**
+   *
+   * @var Graph
+   */
+  private $Graph;
+
+  /**
+   * Prepares the environment before running a test.
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    // TODO Auto-generated GraphTest::setUp()
+
+    $this->Graph = new Graph(/* parameters */);
+
+  }
+
+  /**
+   * Cleans up the environment after running a test.
+   */
+  protected function tearDown() {
+    // TODO Auto-generated GraphTest::tearDown()
+
+    $this->Graph = null;
+
+    parent::tearDown();
+  }
+
+  /**
+   * Constructs the test case.
+   */
+  public function __construct() {
+    // TODO Auto-generated constructor
+  }
+
+  /**
+   * Tests Graph->attributes()
+   */
+  public function testAttributes() {
+    // TODO Auto-generated GraphTest->testAttributes()
+    $this->markTestIncomplete("attributes test not implemented");
+
+    $this->Graph->attributes(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->debug()
+   */
+  public function testDebug() {
+    // TODO Auto-generated GraphTest->testDebug()
+    $this->markTestIncomplete("debug test not implemented");
+
+    $this->Graph->debug(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->getFiles()
+   */
+  public function testGetFiles() {
+    // TODO Auto-generated GraphTest->testGetFiles()
+    $this->markTestIncomplete("getFiles test not implemented");
+
+    $this->Graph->getFiles(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->initGraph()
+   */
+  public function testInitGraph() {
+    // TODO Auto-generated GraphTest->testInitGraph()
+    $this->markTestIncomplete("initGraph test not implemented");
+
+    $this->Graph->initGraph(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->registerClass()
+   */
+  public function testRegisterClass() {
+    // TODO Auto-generated GraphTest->testRegisterClass()
+    $this->markTestIncomplete("registerClass test not implemented");
+
+    $this->Graph->registerClass(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->registerInterface()
+   */
+  public function testRegisterInterface() {
+    // TODO Auto-generated GraphTest->testRegisterInterface()
+    $this->markTestIncomplete("registerInterface test not implemented");
+
+    $this->Graph->registerInterface(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->extractGrammar()
+   */
+  public function testExtractGrammar() {
+    // TODO Auto-generated GraphTest->testExtractGrammar()
+    $this->markTestIncomplete("extractGrammar test not implemented");
+
+    $this->Graph->extractGrammar(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->__construct()
+   */
+  public function test__construct() {
+    // TODO Auto-generated GraphTest->test__construct()
+    $this->markTestIncomplete("__construct test not implemented");
+
+    $this->Graph->__construct(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->implementsAttributes()
+   */
+  public function testImplementsAttributes() {
+    // TODO Auto-generated GraphTest->testImplementsAttributes()
+    $this->markTestIncomplete("implementsAttributes test not implemented");
+
+    $this->Graph->implementsAttributes(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->buildSymbols()
+   */
+  public function testBuildSymbols() {
+    // TODO Auto-generated GraphTest->testBuildSymbols()
+    $this->markTestIncomplete("buildSymbols test not implemented");
+
+    $this->Graph->buildSymbols(/* parameters */);
+
+  }
+
+  /**
+   * Tests Graph->build()
+   */
+  public function testBuild() {
+    // TODO Auto-generated GraphTest->testBuild()
+    $this->markTestIncomplete("build test not implemented");
+
+    $this->Graph->build(/* parameters */);
+
+  }
+
+}
+