Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Rector\PHPUnit\Tests\PHPUnit60\Rector\ClassMethod\AddDoesNotPerformAssertionToNonAssertingTestRector\Fixture;

class SkipExpectUserDeprecationMessageTest extends \PHPUnit\Framework\TestCase
{
public function testExpectUserDeprecationMessage()
{
$this->expectUserDeprecationMessage('Since foo 1.0: Bar is deprecated.');

@trigger_error('Since foo 1.0: Bar is deprecated.', E_USER_DEPRECATED);
}

public function testExpectUserDeprecationMessageMatches()
{
$this->expectUserDeprecationMessageMatches('#^Since foo 1\.0#');

@trigger_error('Since foo 1.0: Bar is deprecated.', E_USER_DEPRECATED);
}
}
1 change: 1 addition & 0 deletions src/NodeAnalyzer/AssertCallAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ final class AssertCallAnalyzer
'expectException',
'setExpectedException',
'expectOutput',
'expectUserDeprecationMessage',
'should',
];

Expand Down
Loading