Skip to content

Commit

Permalink
Rename namespace XSLTBechmark to XSLTBenchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
masicek committed Dec 19, 2011
1 parent 722c90e commit c783bcd
Show file tree
Hide file tree
Showing 37 changed files with 140 additions and 140 deletions.
6 changes: 3 additions & 3 deletions DriversContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark;
namespace XSLTBenchmarking;

require_once LIBS . '/PhpPath/PhpPath.min.php';
require_once ROOT . '/Exceptions.php';
Expand Down Expand Up @@ -69,14 +69,14 @@ public function __construct($driverName)
* @param string $name Name of method
* @param array $arguments List of arguments for calling method
*
* @throws \XSLTBenchmark\UnknownMethodException Unknown method on set driver
* @throws \XSLTBenchmarking\UnknownMethodException Unknown method on set driver
* @return mix
*/
public function __call($name, $arguments)
{
if (!in_array($name, get_class_methods($this->driver)))
{
throw new \XSLTBenchmark\UnknownMethodException('On driver "' . get_class($this->driver) . '" is not method "' . $name . '"');
throw new \XSLTBenchmarking\UnknownMethodException('On driver "' . get_class($this->driver) . '" is not method "' . $name . '"');
}

return call_user_func_array(array($this->driver, $name), $arguments);
Expand Down
2 changes: 1 addition & 1 deletion Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark;
namespace XSLTBenchmarking;

/**
* List of exceptions used in XSLT Benchmarking.
Expand Down
4 changes: 2 additions & 2 deletions RunnerConsole/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\RunnerConsole;
namespace XSLTBenchmarking\RunnerConsole;

define ('LIBS', __DIR__ . '/../Libs');
define ('ROOT', __DIR__ . '/..');
Expand All @@ -17,7 +17,7 @@

use PhpOptions\Options;
use PhpOptions\Option;
use XSLTBenchmark\TestsGenerator\Generator;
use XSLTBenchmarking\TestsGenerator\Generator;

/**
* Class for runnig XSLT Benchmark from console
Expand Down
2 changes: 1 addition & 1 deletion TestsGenerator/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once __DIR__ . '/Templating/Templating.php';
require_once __DIR__ . '/Test.php';
Expand Down
2 changes: 1 addition & 1 deletion TestsGenerator/Params/IParamsDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

/**
* Abstract parent for object for collect params about templates.
Expand Down
4 changes: 2 additions & 2 deletions TestsGenerator/Params/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once LIBS . '/PhpPath/PhpPath.min.php';
require_once ROOT . '/DriversContainer.php';
Expand All @@ -19,7 +19,7 @@
*
* @author Viktor Mašíček <[email protected]>
*/
class Params extends \XSLTBenchmark\DriversContainer
class Params extends \XSLTBenchmarking\DriversContainer
{


Expand Down
2 changes: 1 addition & 1 deletion TestsGenerator/Params/XmlParamsDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once __DIR__ . '/IParamsDriver.php';
require_once __DIR__ . '/../XmlGenerator/XmlGenerator.php';
Expand Down
2 changes: 1 addition & 1 deletion TestsGenerator/Templating/ITemplatingDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

/**
* Interface for object for generating XSLT file from template.
Expand Down
4 changes: 2 additions & 2 deletions TestsGenerator/Templating/SimpleTemplatingDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once __DIR__ . '/ITemplatingDriver.php';
require_once ROOT . '/Exceptions.php';
Expand Down Expand Up @@ -44,7 +44,7 @@ public function generate($templatePath, $outputPath, array $settings = array())
{
if (!copy($templatePath, $outputPath))
{// @codeCoverageIgnoreStart
throw new \XSLTBenchmark\GenerteTemplateException('Cannot create file "' . $outputFile . '".');
throw new \XSLTBenchmarking\GenerteTemplateException('Cannot create file "' . $outputFile . '".');
}// @codeCoverageIgnoreEnd
}

Expand Down
4 changes: 2 additions & 2 deletions TestsGenerator/Templating/SmartyTemplatingDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once LIBS . '/Smarty/Smarty.class.php';
require_once LIBS . '/PhpPath/PhpPath.min.php';
Expand Down Expand Up @@ -64,7 +64,7 @@ public function generate($templatePath, $outputPath, array $settings)

if (!file_put_contents($outputPath, $content))
{// @codeCoverageIgnoreStart
throw new \XSLTBenchmark\GenerteTemplateException('Cannot create file "' . $outputFile . '".');
throw new \XSLTBenchmarking\GenerteTemplateException('Cannot create file "' . $outputFile . '".');
}// @codeCoverageIgnoreEnd
}

Expand Down
4 changes: 2 additions & 2 deletions TestsGenerator/Templating/Templating.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once LIBS . '/PhpPath/PhpPath.min.php';
require_once ROOT . '/DriversContainer.php';
Expand All @@ -19,7 +19,7 @@
*
* @author Viktor Mašíček <[email protected]>
*/
class Templating extends \XSLTBenchmark\DriversContainer
class Templating extends \XSLTBenchmarking\DriversContainer
{


Expand Down
4 changes: 2 additions & 2 deletions TestsGenerator/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once LIBS . '/PhpPath/PhpPath.min.php';
require_once ROOT . '/Exceptions.php';
Expand Down Expand Up @@ -95,7 +95,7 @@ public function setTemplatePath($templatePath)
($parts[$partsCount - 2] != 'tpl') ||
($parts[$partsCount - 1] != 'xsl' && $parts[$partsCount - 1] != 'xslt'))
{
throw new \XSLTBenchmark\InvalidArgumentException('Template path does not have extension ".tpl.xsl" or ".tpl.xslt". It has value "' . $templatePath . '"');
throw new \XSLTBenchmarking\InvalidArgumentException('Template path does not have extension ".tpl.xsl" or ".tpl.xslt". It has value "' . $templatePath . '"');
}

$this->templatePath = $templatePath;
Expand Down
2 changes: 1 addition & 1 deletion TestsGenerator/XmlGenerator/EasyXmlGeneratorDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once __DIR__ . '/IXmlGeneratorDriver.php';

Expand Down
2 changes: 1 addition & 1 deletion TestsGenerator/XmlGenerator/IXmlGeneratorDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

/**
* Inerface for drivers for generating XML files.
Expand Down
4 changes: 2 additions & 2 deletions TestsGenerator/XmlGenerator/XmlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\TestsGenerator;
namespace XSLTBenchmarking\TestsGenerator;

require_once LIBS . '/PhpPath/PhpPath.min.php';
require_once ROOT . '/DriversContainer.php';
Expand All @@ -19,6 +19,6 @@
*
* @author Viktor Mašíček <[email protected]>
*/
class XmlGenerator extends \XSLTBenchmark\DriversContainer
class XmlGenerator extends \XSLTBenchmarking\DriversContainer
{
}
2 changes: 1 addition & 1 deletion Tools/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace XSLTBenchmark\Tools;
namespace XSLTBenchmarking\Tools;

define('DATA_TOOLS', __DIR__ . '/Data');
define('TESTS_TOOLS', __DIR__ . '/Tests');
Expand Down
2 changes: 1 addition & 1 deletion Tools/Tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace Tests\XSLTBenchmark;
namespace Tests\XSLTBenchmarking;


require_once LIBS . '/PhpOptions/PhpOptions.min.php';
Expand Down
34 changes: 17 additions & 17 deletions Tools/Tests/Unit/DriverContainer/DriverContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
* @license "New" BSD License
*/

namespace Tests\XSLTBenchmark\DriversContainer;
namespace Tests\XSLTBenchmarking\DriversContainer;

require_once __DIR__ . '/Foo/Foo.php';

use \Tests\XSLTBenchmark\TestCase;
use \Tests\XSLTBenchmarking\TestCase;

/**
* DriversContainerTest
*
* @author Viktor Mašíček <[email protected]>
*
* @covers XSLTBenchmark\DriversContainer::__construct
* @covers XSLTBenchmark\DriversContainer::__call
* @covers XSLTBenchmark\DriversContainer::getDriversDirectory
* @covers XSLTBenchmark\DriversContainer::getDriversNamespace
* @covers XSLTBenchmark\DriversContainer::getDriversNamesSuffix
* @covers XSLTBenchmarking\DriversContainer::__construct
* @covers XSLTBenchmarking\DriversContainer::__call
* @covers XSLTBenchmarking\DriversContainer::getDriversDirectory
* @covers XSLTBenchmarking\DriversContainer::getDriversNamespace
* @covers XSLTBenchmarking\DriversContainer::getDriversNamesSuffix
*/
class DriversContainerTest extends TestCase
{
Expand All @@ -31,35 +31,35 @@ class DriversContainerTest extends TestCase
public function testFirstFooDriver()
{
$foo = new Foo('first');
$this->assertInstanceOf('\XSLTBenchmark\DriversContainer', $foo);
$this->assertInstanceOf('\Tests\XSLTBenchmark\DriversContainer\Foo', $foo);
$this->assertInstanceOf('\XSLTBenchmarking\DriversContainer', $foo);
$this->assertInstanceOf('\Tests\XSLTBenchmarking\DriversContainer\Foo', $foo);

$driver = $this->getPropertyValue($foo, 'driver');
$this->assertInstanceOf('\Tests\XSLTBenchmark\DriversContainer\IFooDriver', $driver);
$this->assertInstanceOf('\Tests\XSLTBenchmark\DriversContainer\FirstFooDriver', $driver);
$this->assertInstanceOf('\Tests\XSLTBenchmarking\DriversContainer\IFooDriver', $driver);
$this->assertInstanceOf('\Tests\XSLTBenchmarking\DriversContainer\FirstFooDriver', $driver);

$this->assertEquals('First::method1', $foo->methodOne());
$this->assertEquals('First::method2: lorem ipsum', $foo->methodTwo('lorem', 'ipsum'));

$this->setExpectedException('\XSLTBenchmark\UnknownMethodException');
$this->setExpectedException('\XSLTBenchmarking\UnknownMethodException');
$foo->methodUnknown();
}


public function testSecondFooDriver()
{
$foo = new Foo('second');
$this->assertInstanceOf('\XSLTBenchmark\DriversContainer', $foo);
$this->assertInstanceOf('\Tests\XSLTBenchmark\DriversContainer\Foo', $foo);
$this->assertInstanceOf('\XSLTBenchmarking\DriversContainer', $foo);
$this->assertInstanceOf('\Tests\XSLTBenchmarking\DriversContainer\Foo', $foo);

$driver = $this->getPropertyValue($foo, 'driver');
$this->assertInstanceOf('\Tests\XSLTBenchmark\DriversContainer\IFooDriver', $driver);
$this->assertInstanceOf('\Tests\XSLTBenchmark\DriversContainer\SecondFooDriver', $driver);
$this->assertInstanceOf('\Tests\XSLTBenchmarking\DriversContainer\IFooDriver', $driver);
$this->assertInstanceOf('\Tests\XSLTBenchmarking\DriversContainer\SecondFooDriver', $driver);

$this->assertEquals('Second::method1', $foo->methodOne());
$this->assertEquals('Second::method2: lorem ipsum', $foo->methodTwo('lorem', 'ipsum'));

$this->setExpectedException('\XSLTBenchmark\UnknownMethodException');
$this->setExpectedException('\XSLTBenchmarking\UnknownMethodException');
$foo->methodUnknown();
}

Expand Down
2 changes: 1 addition & 1 deletion Tools/Tests/Unit/DriverContainer/Foo/FirstFooDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace Tests\XSLTBenchmark\DriversContainer;
namespace Tests\XSLTBenchmarking\DriversContainer;

require_once __DIR__ . '/IFooDriver.php';

Expand Down
4 changes: 2 additions & 2 deletions Tools/Tests/Unit/DriverContainer/Foo/Foo.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace Tests\XSLTBenchmark\DriversContainer;
namespace Tests\XSLTBenchmarking\DriversContainer;

require_once ROOT . '/DriversContainer.php';

Expand All @@ -16,6 +16,6 @@
*
* @author Viktor Mašíček <[email protected]>
*/
class Foo extends \XSLTBenchmark\DriversContainer
class Foo extends \XSLTBenchmarking\DriversContainer
{
}
2 changes: 1 addition & 1 deletion Tools/Tests/Unit/DriverContainer/Foo/IFooDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace Tests\XSLTBenchmark\DriversContainer;
namespace Tests\XSLTBenchmarking\DriversContainer;

/**
* IFooDriver
Expand Down
2 changes: 1 addition & 1 deletion Tools/Tests/Unit/DriverContainer/Foo/SecondFooDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license "New" BSD License
*/

namespace Tests\XSLTBenchmark\DriversContainer;
namespace Tests\XSLTBenchmarking\DriversContainer;

require_once __DIR__ . '/IFooDriver.php';

Expand Down
12 changes: 6 additions & 6 deletions Tools/Tests/Unit/TestsGenerator/Generator/AddAndGetTestsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
* @license "New" BSD License
*/

namespace Tests\XSLTBenchmark\TestsGenerator\Generator;
namespace Tests\XSLTBenchmarking\TestsGenerator\Generator;

require_once ROOT . '/TestsGenerator/Generator.php';
require_once ROOT . '/TestsGenerator/Test.php';

use \Tests\XSLTBenchmark\TestCase;
use \XSLTBenchmark\TestsGenerator\Generator;
use \XSLTBenchmark\TestsGenerator\Test;
use \Tests\XSLTBenchmarking\TestCase;
use \XSLTBenchmarking\TestsGenerator\Generator;
use \XSLTBenchmarking\TestsGenerator\Test;

/**
* AddAndGetTestsTest
*
* @author Viktor Mašíček <[email protected]>
*
* @covers \XSLTBenchmark\TestsGenerator\Generator::addTests
* @covers \XSLTBenchmark\TestsGenerator\Generator::getTests
* @covers \XSLTBenchmarking\TestsGenerator\Generator::addTests
* @covers \XSLTBenchmarking\TestsGenerator\Generator::getTests
*/
class AddAndGetTestsTest extends TestCase
{
Expand Down
Loading

0 comments on commit c783bcd

Please sign in to comment.