Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename namespace from PHPSpec\PHPSpec2 to PHPSpec2

  • Loading branch information...
commit b92636e296213efe70bfd36be9fb60873e2b1d9d 1 parent eea2b7c
@MarcelloDuarte authored
View
4 bin/phpspec
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-define('PHPSPEC2_VERSION', '0.0.1-PREVIEW');
+define('PHPSPEC2_VERSION', '2.0.1-PREVIEW');
if (is_dir($vendor = __DIR__ . '/../vendor')) {
require($vendor . '/autoload.php');
@@ -15,5 +15,5 @@ if (is_dir($vendor = __DIR__ . '/../vendor')) {
);
}
-$app = new PHPSpec\PHPSpec2\Console\Application(PHPSPEC2_VERSION);
+$app = new PHPSpec2\Console\Application(PHPSPEC2_VERSION);
$app->run();
View
2  composer.json
@@ -27,7 +27,7 @@
"autoload": {
"psr-0": {
- "PHPSpec\\PHPSpec2": "src/",
+ "PHPSpec2": "src/",
"Spec": "specs/"
}
},
View
12 specs/Spec/PHPSpec/PHPSpec2/Stub.php
@@ -1,28 +1,28 @@
<?php
-namespace Spec\PHPSpec\PHPSpec2;
+namespace Spec\PHPSpec2;
-use PHPSpec\PHPSpec2\SpecificationInterface;
+use PHPSpec2\SpecificationInterface;
class Stub implements SpecificationInterface
{
public function described_with($stub)
{
- $stub->is_an_instance_of('PHPSpec\PHPSpec2\Stub');
+ $stub->is_an_instance_of('PHPSpec2\Stub');
}
public function registers_matcher_if_it_has_aliases($stub, $matcher)
{
- $matcher->is_a_mock_of('PHPSpec\PHPSpec2\Matcher\MatcherInterface');
+ $matcher->is_a_mock_of('PHPSpec2\Matcher\MatcherInterface');
$matcher->getAliases()->should_return(array('should_be_equal'));
$stub->__registerMatcher($matcher);
- $stub->__getMatchers()->should_contain(1);
+ $stub->__getMatchers()->should_contain(2);
}
public function does_not_registers_matcher_if_it_has_no_aliases($stub, $matcher)
{
- $matcher->is_a_mock_of('PHPSpec\PHPSpec2\Matcher\MatcherInterface');
+ $matcher->is_a_mock_of('PHPSpec2\Matcher\MatcherInterface');
$matcher->getAliases()->should_return(array());
$stub->__registerMatcher($matcher);
View
9 src/PHPSpec/PHPSpec2/Exception/Matcher/MatcherException.php
@@ -1,9 +0,0 @@
-<?php
-
-namespace PHPSpec\PHPSpec2\Exception\Matcher;
-
-use PHPSpec\PHPSpec2\Exception\Exception;
-
-class MatcherException extends Exception
-{
-}
View
2  src/PHPSpec/PHPSpec2/Console/Application.php → src/PHPSpec2/Console/Application.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2\Console;
+namespace PHPSpec2\Console;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Input\InputOption;
View
10 src/PHPSpec/PHPSpec2/Console/Command/TestCommand.php → src/PHPSpec2/Console/Command/TestCommand.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2\Console\Command;
+namespace PHPSpec2\Console\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Output\OutputInterface;
@@ -12,9 +12,9 @@
use ReflectionClass;
use ReflectionMethod;
-use PHPSpec\PHPSpec2\Stub;
-use PHPSpec\PHPSpec2\Matcher;
-use PHPSpec\PHPSpec2\SpecificationInterface;
+use PHPSpec2\Stub;
+use PHPSpec2\Matcher;
+use PHPSpec2\SpecificationInterface;
class TestCommand extends Command
{
@@ -115,7 +115,7 @@ private function getSpecReflectionFromFile(SplFileInfo $file, $specsPath)
}
$reflection = new ReflectionClass($classname);
- if (!$reflection->implementsInterface('PHPSpec\\PHPSpec2\\SpecificationInterface')) {
+ if (!$reflection->implementsInterface('PHPSpec2\\SpecificationInterface')) {
return;
}
View
2  ...HPSpec2/Exception/ClassDoesNotExistsException.php → ...HPSpec2/Exception/ClassDoesNotExistsException.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2\Exception;
+namespace PHPSpec2\Exception;
class ClassDoesNotExistsException extends StubException
{
View
2  src/PHPSpec/PHPSpec2/Exception/Exception.php → src/PHPSpec2/Exception/Exception.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2\Exception;
+namespace PHPSpec2\Exception;
class Exception extends \Exception
{
View
9 src/PHPSpec2/Exception/Matcher/MatcherException.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PHPSpec2\Exception\Matcher;
+
+use PHPSpec2\Exception\Exception;
+
+class MatcherException extends Exception
+{
+}
View
2  ...ec/PHPSpec2/Exception/MethodNotFoundException.php → src/PHPSpec2/Exception/MethodNotFoundException.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2\Exception;
+namespace PHPSpec2\Exception;
class MethodNotFoundException extends StubException
{
View
2  .../PHPSpec2/Exception/PropertyNotFoundException.php → src/PHPSpec2/Exception/PropertyNotFoundException.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2\Exception;
+namespace PHPSpec2\Exception;
class PropertyNotFoundException extends StubException
{
View
2  src/PHPSpec/PHPSpec2/Exception/StubException.php → src/PHPSpec2/Exception/StubException.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2\Exception;
+namespace PHPSpec2\Exception;
class StubException extends Exception
{
View
4 src/PHPSpec/PHPSpec2/Matcher/MatcherInterface.php → src/PHPSpec2/Matcher/MatcherInterface.php
@@ -1,8 +1,8 @@
<?php
-namespace PHPSpec\PHPSpec2\Matcher;
+namespace PHPSpec2\Matcher;
-use PHPSpec\PHPSpec2\Stub;
+use PHPSpec2\Stub;
interface MatcherInterface
{
View
6 ...PHPSpec/PHPSpec2/Matcher/ShouldContainMatcher.php → src/PHPSpec2/Matcher/ShouldContainMatcher.php
@@ -1,9 +1,9 @@
<?php
-namespace PHPSpec\PHPSpec2\Matcher;
+namespace PHPSpec2\Matcher;
-use PHPSpec\PHPSpec2\Stub;
-use PHPSpec\PHPSpec2\Exception\Matcher\MatcherException;
+use PHPSpec2\Stub;
+use PHPSpec2\Exception\Matcher\MatcherException;
class ShouldContainMatcher implements MatcherInterface
{
View
4 src/PHPSpec/PHPSpec2/Matcher/ShouldReturnMatcher.php → src/PHPSpec2/Matcher/ShouldReturnMatcher.php
@@ -1,8 +1,8 @@
<?php
-namespace PHPSpec\PHPSpec2\Matcher;
+namespace PHPSpec2\Matcher;
-use PHPSpec\PHPSpec2\Stub;
+use PHPSpec2\Stub;
class ShouldReturnMatcher implements MatcherInterface
{
View
2  src/PHPSpec/PHPSpec2/SpecificationInterface.php → src/PHPSpec2/SpecificationInterface.php
@@ -1,6 +1,6 @@
<?php
-namespace PHPSpec\PHPSpec2;
+namespace PHPSpec2;
interface SpecificationInterface
{
View
10 src/PHPSpec/PHPSpec2/Stub.php → src/PHPSpec2/Stub.php
@@ -1,16 +1,16 @@
<?php
-namespace PHPSpec\PHPSpec2;
+namespace PHPSpec2;
use ReflectionClass;
use Mockery;
use Mockery\MockInterface;
-use PHPSpec\PHPSpec2\Matcher\MatcherInterface;
-use PHPSpec\PHPSpec2\Exception\StubException;
-use PHPSpec\PHPSpec2\Exception\ClassDoesNotExistsException;
-use PHPSpec\PHPSpec2\Exception\MethodNotFoundException;
+use PHPSpec2\Matcher\MatcherInterface;
+use PHPSpec2\Exception\StubException;
+use PHPSpec2\Exception\ClassDoesNotExistsException;
+use PHPSpec2\Exception\MethodNotFoundException;
class Stub
{
Please sign in to comment.
Something went wrong with that request. Please try again.