MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
Loading...
Searching...
No Matches
MockBoilerplateSniff.php File Reference

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...

Classes

class  MediaWiki\Sniffs\PHPUnit\MockBoilerplateSniff
 Simplify set up of mocks in PHPUnit test cases: ->will( $this->returnValue( ... ) ) becomes ->willReturn( ... ) as well as other ->will() shortcuts, see PHPUnit docs table 8.1 ->with( $this->equalTo( ... ) ) becomes ->with( ... ), for any number of parameters provided, since equalTo() is the default constraint checked if a value is provided (as long as the equalTo() call only had a single parameter) ->exactly( 1 ) becomes ->once() ->exactly( 0 ) becomes ->never() More...
 

Namespaces

namespace  MediaWiki\Sniffs\PHPUnit
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
 

Detailed Description

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html