Skip to content

Commit

Permalink
Clean up test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonFrings committed Jun 4, 2020
1 parent ebb6baa commit f2db88d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"autoload": {
"psr-4": { "Clue\\React\\Ssdp\\": "src/" }
},
"autoload-dev": {
"psr-4": { "Clue\\Tests\\React\\Ssdp\\": "tests/" }
},
"require": {
"php": ">=5.3",
"clue/multicast-react": "^1.0 || ^0.2",
Expand Down
7 changes: 1 addition & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="SSDP Test Suite">
<directory>./tests/</directory>
Expand Down
4 changes: 3 additions & 1 deletion tests/ClientTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Ssdp;

use Clue\React\Ssdp\Client;
use React\EventLoop\Factory;

Expand Down Expand Up @@ -37,7 +39,7 @@ interface_exists('React\EventLoop\TimerInterface') ? 'React\EventLoop\TimerInter

$this->assertInstanceOf('React\Promise\PromiseInterface', $promise);

if (!($promise instanceof React\Promise\CancellablePromiseInterface)) {
if (!($promise instanceof \React\Promise\CancellablePromiseInterface)) {
$this->markTestSkipped();
}

Expand Down
4 changes: 2 additions & 2 deletions tests/bootstrap.php → tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

require __DIR__ . '/../vendor/autoload.php';
namespace Clue\Tests\React\Ssdp;

class TestCase extends PHPUnit\Framework\TestCase
class TestCase extends \PHPUnit\Framework\TestCase
{
protected function expectCallableOnce()
{
Expand Down

0 comments on commit f2db88d

Please sign in to comment.