Skip to content

Commit

Permalink
Merge pull request #1 from botjaeger/feature/update-nexmo-client
Browse files Browse the repository at this point in the history
Fix test namespaces & Update nexmo-client
  • Loading branch information
botjaeger authored Aug 28, 2020
2 parents 2c96b57 + 8833fe8 commit cc74536
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/vendor/
/.idea/

composer.lock
/var/
/composer.lock
/var/
/.phpunit.result.cache
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ composer require botjaeger/nexmo-bundle
```

Then add the following line to your app/AppKernel.php
```php
```
public function registerBundles()
{
return [
...
...,
new Botjaeger\NexmoBundle\BotjaegerNexmoBundle(),
];
}
Expand All @@ -35,12 +35,12 @@ botjaeger_nexmo:
### Usage

Then call 'botjaeger_nexmo.nexmo_client.client' in the container (some simplified methods)
```php
```
$api = $this->get('botjaeger_nexmo.nexmo_client.client');
...
```
Or use the default nexmo client
```php
```
$api = $this->get('default_nexmo.client');
...
```
Expand Down
20 changes: 12 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,24 @@
"Botjaeger\\NexmoBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Botjaeger\\NexmoBundle\\": "tests/"
}
},
"require": {
"php": ">=7.1",
"nexmo/client": "^1.6",
"symfony/config": "^3.4|^4.1",
"symfony/dependency-injection": "^3.4|^4.1",
"symfony/http-kernel": "^3.4|^4.1",
"symfony/yaml": "^3.4|^4.1"
"nexmo/client": "^2.0",
"symfony/config": "^3.4|^4.0",
"symfony/dependency-injection": "^3.4|^4.0",
"symfony/http-kernel": "^3.4|^4.0",
"symfony/yaml": "^3.4|^4.0"
},
"require-dev": {
"symfony/framework-bundle": "^3.4|^4.1",
"phpunit/phpunit": "^7.4",
"symfony/browser-kit": "^4.3",
"symfony/css-selector": "^4.3",
"symfony/phpunit-bridge": "^4.3"
"symfony/framework-bundle": "^3.4|^4.1",
"symfony/phpunit-bridge": "^5.1"
},
"config": {
"sort-packages": true
Expand Down
29 changes: 12 additions & 17 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.7/phpunit.xsd"
bootstrap="tests/Fixtures/Botjaeger/autoload.php"
colors="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
executionOrder="depends,defects"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
verbose="true">

<php>
<server name="KERNEL_CLASS" value="AppKernel" />
</php>

<testsuites>
<testsuite name="BotjaegerNexmoBundle Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>

<php>
<server name="KERNEL_CLASS" value="Botjaeger\NexmoBundle\Fixtures\Botjaeger\AppKernel"/>
</php>
<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>fixtures</directory>
<directory>vendor</directory>
<directory>tests</directory>
</exclude>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>

</phpunit>
2 changes: 1 addition & 1 deletion tests/DependencyInjection/BotjaegerNexmoExtensionTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Botjaeger\NexmoBundle\Tests\DependencyInjection;
namespace Botjaeger\NexmoBundle\DependencyInjection;

use Nexmo\Client;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
Expand Down
6 changes: 4 additions & 2 deletions tests/Fixtures/Botjaeger/AppKernel.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Botjaeger\NexmoBundle\Fixtures\Botjaeger;

use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;

Expand All @@ -8,8 +10,8 @@ class AppKernel extends Kernel
public function registerBundles()
{
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Botjaeger\NexmoBundle\BotjaegerNexmoBundle()
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new \Botjaeger\NexmoBundle\BotjaegerNexmoBundle()
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
Expand Down

0 comments on commit cc74536

Please sign in to comment.