Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit 346591b

Browse files
Closes #137
1 parent 4edd915 commit 346591b

25 files changed

+50
-0
lines changed

PHPUnit/Framework/MockObject/Generator/mocked_class.tpl.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
1313
{
14+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
15+
1416
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
1517
}
1618

Tests/MockObject/class.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
8989

9090
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
9191
{
92+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
93+
9294
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
9395
}
9496

Tests/MockObject/class_call_parent_clone.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
4242

4343
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4444
{
45+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
46+
4547
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4648
}
4749

Tests/MockObject/class_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
4141

4242
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4343
{
44+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
45+
4446
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4547
}
4648

Tests/MockObject/class_dont_call_parent_clone.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
4141

4242
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4343
{
44+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
45+
4446
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4547
}
4648

Tests/MockObject/class_dont_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
4141

4242
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4343
{
44+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
45+
4446
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4547
}
4648

Tests/MockObject/class_implementing_interface_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
4646

4747
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4848
{
49+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
50+
4951
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
5052
}
5153

Tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
4646

4747
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4848
{
49+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
50+
4951
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
5052
}
5153

Tests/MockObject/class_partial.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
6868

6969
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
7070
{
71+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
72+
7173
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
7274
}
7375

Tests/MockObject/interface.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, Foo
6262

6363
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
6464
{
65+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
66+
6567
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
6668
}
6769

Tests/MockObject/invocation_object_clone_object.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
9191

9292
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
9393
{
94+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
95+
9496
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
9597
}
9698

Tests/MockObject/invocation_static_clone_object.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
9191

9292
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
9393
{
94+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
95+
9496
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
9597
}
9698

Tests/MockObject/namespaced_class.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
9292

9393
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
9494
{
95+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
96+
9597
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
9698
}
9799

Tests/MockObject/namespaced_class_call_parent_clone.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4444

4545
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4646
{
47+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
48+
4749
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4850
}
4951

Tests/MockObject/namespaced_class_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4343

4444
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4545
{
46+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
47+
4648
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4749
}
4850

Tests/MockObject/namespaced_class_dont_call_parent_clone.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4343

4444
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4545
{
46+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
47+
4648
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4749
}
4850

Tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4343

4444
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4545
{
46+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
47+
4648
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4749
}
4850

Tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4848

4949
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
5050
{
51+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
52+
5153
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
5254
}
5355

Tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4848

4949
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
5050
{
51+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
52+
5153
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
5254
}
5355

Tests/MockObject/namespaced_class_partial.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
7070

7171
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
7272
{
73+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
74+
7375
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
7476
}
7577

Tests/MockObject/namespaced_interface.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, NS\Foo
6464

6565
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
6666
{
67+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
68+
6769
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
6870
}
6971

Tests/MockObject/nonexistent_class.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
3939

4040
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4141
{
42+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
43+
4244
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4345
}
4446

Tests/MockObject/nonexistent_class_with_namespace.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4545

4646
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4747
{
48+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
49+
4850
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4951
}
5052

Tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
4545

4646
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
4747
{
48+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
49+
4850
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
4951
}
5052

Tests/MockObject/proxy.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class ProxyFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
8585

8686
public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
8787
{
88+
PHPUnit_Util_DeprecatedFeature_Logger::log('The stubbing and mocking of static methods is deprecated and will be removed in PHPUnit 3.9.');
89+
8890
return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
8991
}
9092

0 commit comments

Comments
 (0)