Skip to content

Commit 622239f

Browse files
committed
Code cleanup
1 parent 01c0fa4 commit 622239f

File tree

11 files changed

+53
-282
lines changed

11 files changed

+53
-282
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
out/
21
/.idea
32
/.gradle
43
/build

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ publishPlugin {
3434
}
3535

3636
patchPluginXml {
37-
sinceBuild phpPluginVersion
3837
changeNotes = htmlFixer('src/main/resources/META-INF/change-notes.html')
3938
}
4039

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<p>Fork of <a href="https://github.com/Haehnchen/idea-php-phpunit-plugin">PHPUnit Enhancement</a></p>
3939
]]></description>
4040

41-
<idea-version since-build="201.6668.153"/>
41+
<idea-version since-build="201.6668.121"/>
4242

4343
<depends>com.jetbrains.php</depends>
4444
<depends>com.intellij.modules.platform</depends>

src/test/java/de/espend/idea/php/phpunit/tests/completion/fixtures/PhpUnitCompletionContributor.php

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -65,51 +65,3 @@ public function method($constraint)
6565
}
6666
}
6767
}
68-
69-
namespace
70-
{
71-
abstract class PHPUnit_Framework_TestCase
72-
{
73-
/**
74-
* @param string $originalClassName
75-
*
76-
* @return PHPUnit_Framework_MockObject_MockObject
77-
*/
78-
protected function createMock($originalClassName)
79-
{
80-
return new PHPUnit_Framework_MockObject_MockObject();
81-
}
82-
}
83-
84-
/**
85-
* @method PHPUnit_Framework_MockObject_Builder_InvocationMocker method($constraint)
86-
*/
87-
class PHPUnit_Framework_MockObject_MockObject
88-
{
89-
/**
90-
* @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
91-
*/
92-
public function expects()
93-
{
94-
return new PHPUnit_Framework_MockObject_Builder_InvocationMocker();
95-
}
96-
}
97-
98-
class PHPUnit_Framework_MockObject_MockBuilder
99-
{
100-
101-
}
102-
103-
class PHPUnit_Framework_MockObject_Builder_InvocationMocker
104-
{
105-
/**
106-
* @param \PHPUnit_Framework_Constraint|string $constraint
107-
*
108-
* @return \PHPUnit_Framework_MockObject_Builder_InvocationMocker
109-
*/
110-
public function method($constraint)
111-
{
112-
return new PHPUnit_Framework_MockObject_Builder_InvocationMocker();
113-
}
114-
}
115-
}
Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
<?php
22

3+
namespace Foo
4+
{
5+
class Bar
6+
{
7+
public function getFooBar()
8+
{
9+
}
10+
}
11+
}
12+
313
namespace PHPUnit\Framework
414
{
15+
use PHPUnit\Framework\MockObject\MockObject;
16+
517
abstract class TestCase
618
{
719
/**
820
* @param string $originalClassName
921
*
10-
* @return \PHPUnit_Framework_MockObject_MockObject
22+
* @return MockObject
1123
*/
1224
protected function createMock($originalClassName)
1325
{
14-
return new \PHPUnit_Framework_MockObject_MockObject();
26+
return new MockObject();
1527
}
1628

1729
/**
@@ -23,69 +35,56 @@ public function getMockBuilder() {
2335
}
2436
}
2537

26-
namespace
38+
namespace PHPUnit\Framework\MockObject
2739
{
28-
abstract class PHPUnit_Framework_TestCase
40+
use PHPUnit\Framework\MockObject\Builder\InvocationMocker;
41+
42+
class MockBuilder
2943
{
3044
/**
31-
* @param string $originalClassName
32-
*
33-
* @return PHPUnit_Framework_MockObject_MockObject
45+
* @return $this
3446
*/
35-
protected function createMock($originalClassName)
47+
public function disableOriginalConstructor()
3648
{
37-
return new PHPUnit_Framework_MockObject_MockObject();
49+
return $this;
3850
}
39-
}
4051

41-
class PHPUnit_Framework_MockObject_MockObject
42-
{
4352
/**
44-
* @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
53+
* @return $this
4554
*/
46-
public function expects()
55+
public function getMock()
4756
{
48-
return new PHPUnit_Framework_MockObject_Builder_InvocationMocker();
57+
return $this;
4958
}
50-
}
5159

52-
class PHPUnit_Framework_MockObject_MockBuilder
53-
{
54-
}
55-
56-
class PHPUnit_Framework_MockObject_Builder_InvocationMocker
57-
{
58-
}
59-
}
60-
61-
namespace PHPUnit\Framework\MockObject
62-
{
63-
class MockBuilder
64-
{
6560
/**
66-
* @return $this
61+
* @return InvocationMocker
6762
*/
68-
public function disableOriginalConstructor()
63+
public function expects()
6964
{
70-
return $this;
65+
return new InvocationMocker();
7166
}
7267

7368
/**
74-
* @return $this
69+
* @return InvocationMocker
7570
*/
76-
public function getMock()
71+
public function method($constraint)
7772
{
78-
return $this;
73+
return new InvocationMocker();
7974
}
8075
}
8176
}
8277

83-
namespace Foo
78+
namespace PHPUnit\Framework\MockObject\Builder
8479
{
85-
class Bar
80+
class InvocationMocker
8681
{
87-
public function getFooBar()
88-
{
89-
}
82+
/**
83+
* @return InvocationMocker
84+
*/
85+
public function method($constraint)
86+
{
87+
return new self();
88+
}
9089
}
91-
}
90+
}

src/test/java/de/espend/idea/php/phpunit/tests/references/fixtures/PhpUnitReferenceContributor.php

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -65,42 +65,3 @@ public function method($constraint)
6565
}
6666
}
6767
}
68-
69-
namespace
70-
{
71-
abstract class PHPUnit_Framework_TestCase
72-
{
73-
/**
74-
* @param string $originalClassName
75-
*
76-
* @return PHPUnit_Framework_MockObject_MockObject
77-
*/
78-
protected function createMock($originalClassName)
79-
{
80-
return new PHPUnit_Framework_MockObject_MockObject();
81-
}
82-
}
83-
84-
/**
85-
* @method PHPUnit_Framework_MockObject_Builder_InvocationMocker method($constraint)
86-
*/
87-
class PHPUnit_Framework_MockObject_MockObject
88-
{
89-
/**
90-
* @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
91-
*/
92-
public function expects()
93-
{
94-
return new PHPUnit_Framework_MockObject_Builder_InvocationMocker();
95-
}
96-
}
97-
98-
class PHPUnit_Framework_MockObject_MockBuilder
99-
{
100-
101-
}
102-
103-
class PHPUnit_Framework_MockObject_Builder_InvocationMocker
104-
{
105-
}
106-
}

src/test/java/de/espend/idea/php/phpunit/tests/type/fixtures/ProphecyArgumentTypeProvider.php

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
namespace PHPUnit\Framework
44
{
5-
65
use Prophecy\Prophecy\ObjectProphecy;
7-
8-
class TestCase extends \PHPUnit_Framework_MockObject_InvocationMocker
96
{
10-
/**
11-
* @param null $classOrInterface
12-
* @return \Prophecy\Prophecy\ObjectProphecy
13-
*/
14-
protected function prophesize($classOrInterface = null)
7+
class TestCase
158
{
16-
return new ObjectProphecy();
9+
/**
10+
* @param null $classOrInterface
11+
* @return \Prophecy\Prophecy\ObjectProphecy
12+
*/
13+
protected function prophesize($classOrInterface = null)
14+
{
15+
return new ObjectProphecy();
16+
}
1717
}
18-
};
18+
}
1919
}
2020

2121
namespace Prophecy
@@ -28,15 +28,7 @@ public static function any()
2828
}
2929
}
3030

31-
namespace
32-
{
33-
class PHPUnit_Framework_MockObject_InvocationMocker
34-
{
35-
public function willReturn($value, ...$nextValues)
36-
{
37-
}
38-
}
39-
31+
namespace {
4032
class Foo
4133
{
4234
public function getBar(array $test, Foo $foo)

src/test/java/de/espend/idea/php/phpunit/tests/type/fixtures/RevealProphecyTypeProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
namespace PHPUnit\Framework
44
{
5-
65
use Prophecy\Prophecy\ObjectProphecy;
76

8-
class TestCase extends \PHPUnit_Framework_MockObject_InvocationMocker
7+
class TestCase
98
{
109
/**
1110
* @param null $classOrInterface

src/test/java/de/espend/idea/php/phpunit/tests/utils/fixtures/ChainVisitorUtil.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -40,39 +40,3 @@ class InvocationMocker
4040
{
4141
}
4242
}
43-
44-
namespace
45-
{
46-
abstract class PHPUnit_Framework_TestCase
47-
{
48-
/**
49-
* @param string $originalClassName
50-
*
51-
* @return PHPUnit_Framework_MockObject_MockObject
52-
*/
53-
protected function createMock($originalClassName)
54-
{
55-
return new PHPUnit_Framework_MockObject_MockObject();
56-
}
57-
}
58-
59-
class PHPUnit_Framework_MockObject_MockObject
60-
{
61-
/**
62-
* @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
63-
*/
64-
public function expects()
65-
{
66-
return new PHPUnit_Framework_MockObject_Builder_InvocationMocker();
67-
}
68-
}
69-
70-
class PHPUnit_Framework_MockObject_MockBuilder
71-
{
72-
73-
}
74-
75-
class PHPUnit_Framework_MockObject_Builder_InvocationMocker
76-
{
77-
}
78-
}

0 commit comments

Comments
 (0)