diff --git a/behat.yml-dist b/behat.yml-dist index c3d21285..79f85df0 100644 --- a/behat.yml-dist +++ b/behat.yml-dist @@ -20,4 +20,4 @@ default: files_path: 'fixtures/files' goutte: ~ selenium2: ~ - Sanpi\Behatch\Extension: ~ + Behatch\Extension: ~ diff --git a/bin/main b/bin/main index af876420..7eed999e 100644 --- a/bin/main +++ b/bin/main @@ -10,10 +10,10 @@ */ spl_autoload_register(function($class) { - if (false !== strpos($class, 'Sanpi\\Behatch')) { + if (false !== strpos($class, 'Behatch')) { require_once(__DIR__.'/../src/'.str_replace('\\', '/', $class).'.php'); return true; } }, true, false); -return new Sanpi\Behatch\Extension; +return new Behatch\Extension; diff --git a/composer.json b/composer.json index bf00fbaa..3186039a 100644 --- a/composer.json +++ b/composer.json @@ -22,15 +22,11 @@ "autoload": { "psr-4": { - "Sanpi\\Behatch\\": "src/" + "Behatch\\": "src/" } }, "config": { "bin-dir": "bin/" - }, - - "replace": { - "sanpi/Behatch-skeleton": "self.version" } } diff --git a/doc/index.rst b/doc/index.rst index be4639b1..6029b461 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -75,7 +75,7 @@ Project dependancy default: # ... extensions: - Sanpi\Behatch\Extension: ~ + Behatch\Extension: ~ Project boostraping ******************* diff --git a/src/Context/BaseContext.php b/src/Context/BaseContext.php index fba81b72..ca379e2a 100644 --- a/src/Context/BaseContext.php +++ b/src/Context/BaseContext.php @@ -1,6 +1,6 @@ addTag(ContextExtension::CLASS_RESOLVER_TAG); $container->setDefinition('behatch.class_resolver', $definition); } diff --git a/src/HttpCall/ContextSupportedVoter.php b/src/HttpCall/ContextSupportedVoter.php index cdeb6997..34b2e61c 100644 --- a/src/HttpCall/ContextSupportedVoter.php +++ b/src/HttpCall/ContextSupportedVoter.php @@ -1,6 +1,6 @@ getParameters(); foreach ($parameters as $parameter) { - if (null !== $parameter->getClass() && $parameter->getClass()->name === 'Sanpi\\Behatch\\HttpCall\\HttpCallResultPool') { + if (null !== $parameter->getClass() && $parameter->getClass()->name === 'Behatch\\HttpCall\\HttpCallResultPool') { $arguments[$parameter->name] = $this->httpCallResultPool; } } diff --git a/src/HttpCall/RestContextVoter.php b/src/HttpCall/RestContextVoter.php index 845339a8..01d47e8f 100644 --- a/src/HttpCall/RestContextVoter.php +++ b/src/HttpCall/RestContextVoter.php @@ -1,6 +1,6 @@ given( - $json = new \mock\Sanpi\Behatch\Json\Json('{}'), + $json = new \mock\Behatch\Json\Json('{}'), $json->getMockController()->read = 'foobar' ) ->and( @@ -38,7 +38,7 @@ public function test_should_fail_if_json_reading_fail() { $this ->given( - $json = new \mock\Sanpi\Behatch\Json\Json('{}'), + $json = new \mock\Behatch\Json\Json('{}'), $json->getMockController()->read->throw = new \Exception() ) ->and( @@ -55,7 +55,7 @@ public function test_should_convert_expression_if_javascript_mode() { $this ->given( - $json = new \mock\Sanpi\Behatch\Json\Json('{}'), + $json = new \mock\Behatch\Json\Json('{}'), $json->getMockController()->read = 'foobar' ) ->and( @@ -78,7 +78,7 @@ public function test_should_no_convert_expression_if_no_javascript_mode() { $this ->given( - $json = new \mock\Sanpi\Behatch\Json\Json('{}'), + $json = new \mock\Behatch\Json\Json('{}'), $json->getMockController()->read = 'foobar' ) ->and( @@ -101,8 +101,8 @@ public function test_should_valid_json_through_its_schema() { $this ->given( - $json = new \mock\Sanpi\Behatch\Json\Json('{}'), - $schema = new \mock\Sanpi\Behatch\Json\JsonSchema('{}'), + $json = new \mock\Behatch\Json\Json('{}'), + $schema = new \mock\Behatch\Json\JsonSchema('{}'), $schema->getMockController()->resolve = $schema, $schema->getMockController()->validate = 'foobar', $inspector = new TestedClass('foo') diff --git a/tests/units/Json/JsonSchema.php b/tests/units/Json/JsonSchema.php index 02b97b18..a5870f58 100644 --- a/tests/units/Json/JsonSchema.php +++ b/tests/units/Json/JsonSchema.php @@ -1,9 +1,9 @@ given( $schema = new TestedClass('{}'), - $json = new \Sanpi\Behatch\Json\Json('{}'), + $json = new \Behatch\Json\Json('{}'), $validator = new \mock\JsonSchema\Validator, $validator->getMockController()->check = true ) @@ -73,7 +73,7 @@ public function test_should_throw_exception_for_incorrect_json() $this ->given( $schema = new TestedClass('{}'), - $json = new \Sanpi\Behatch\Json\Json('{}'), + $json = new \Behatch\Json\Json('{}'), $validator = new \mock\JsonSchema\Validator, $validator->getMockController()->check = false, $validator->getMockController()->getErrors = array(