diff --git a/tests/Pipe/PipelineTest.php b/tests/Pipe/PipelineTest.php new file mode 100644 index 0000000..10e21dc --- /dev/null +++ b/tests/Pipe/PipelineTest.php @@ -0,0 +1,27 @@ +setInputFile("/tmp/rand.in"); + $pipe->setOutputFile("/tmp/rand.out"); + $pipe->run(); + + $out = file_get_contents("/tmp/rand.out"); + $this->assertEquals($rand, $out); + } +} diff --git a/tests/Plugin/PluginManagerTest.php b/tests/Plugin/PluginManagerTest.php new file mode 100644 index 0000000..d7374ff --- /dev/null +++ b/tests/Plugin/PluginManagerTest.php @@ -0,0 +1,31 @@ +registerPlugin('test.testplugin', $plugin); + + $gplugin = $manager->getPlugin('test.testplugin'); + + $this->assertEquals($plugin, $gplugin); + } +} + +class TestPlugin extends SparkPlug +{ + public function load() + {} +} \ No newline at end of file diff --git a/tests/spark.json b/tests/spark.json new file mode 100644 index 0000000..cc41888 --- /dev/null +++ b/tests/spark.json @@ -0,0 +1,3 @@ +{ + "preload": [ "./.spark/plugins/*" ] +}