Skip to content

Commit 0324b5c

Browse files
add mock for ProphecyTrait
1 parent 021d560 commit 0324b5c

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

Tests/ProphecyTrait.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Prophecy\PhpUnit;
4+
5+
trait ProphecyTrait
6+
{
7+
public function prophesize($classOrInterface = null)
8+
{
9+
}
10+
}

Tests/Unit/Search/SearchManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
class SearchManagerTest extends TestCase
3232
{
3333
use ProphecyTrait;
34-
34+
3535
/**
3636
* @var AdapterInterface
3737
*/

Tests/bootstrap.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
require_once __DIR__ . '/../vendor/symfony-cmf/testing/bootstrap/bootstrap.php';
4+
5+
if (!\trait_exists('Prophecy\PhpUnit\ProphecyTrait')) {
6+
require_once __DIR__ . '/ProphecyTrait.php';
7+
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141

4242
"webmozart/assert": "^1.7",
4343
"phpspec/prophecy": "^1.15",
44-
"doctrine/annotations": "^1.14"
44+
"doctrine/annotations": "^1.14",
45+
"phpspec/prophecy-phpunit": "^2.1"
4546
},
4647
"suggest": {
4748
"sensio/distribution-bundle": "Required if the SearchScriptHandler is used",

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
colors="true"
4-
bootstrap="vendor/symfony-cmf/testing/bootstrap/bootstrap.php"
4+
bootstrap="tests/bootstrap.php"
55
>
66

77
<testsuites>

0 commit comments

Comments
 (0)