Skip to content

Commit c3808e8

Browse files
committed
Update tests and readme
1 parent 07bbec0 commit c3808e8

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ code that fits your purposes. You can create very compact code, when you need to
1818
limit the size of the output, or you can create code in the style that actually
1919
fits in any of your dynamically generated PHP files.
2020

21-
The API documentation, which can be generated using Apigen, can be read online
22-
at: http://kit.riimu.net/api/phpencoder/
21+
The API documentation is available at: http://kit.riimu.net/api/phpencoder/
2322

2423
[![Travis](https://img.shields.io/travis/Riimu/Kit-PHPEncoder.svg?style=flat-square)](https://travis-ci.org/Riimu/Kit-PHPEncoder)
2524
[![Scrutinizer](https://img.shields.io/scrutinizer/g/Riimu/Kit-PHPEncoder.svg?style=flat-square)](https://scrutinizer-ci.com/g/Riimu/Kit-PHPEncoder/)

tests/tests/EncodingTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public function testOptions()
1818
->setMethods(['getDefaultOptions', 'supports', 'encode'])
1919
->getMock();
2020

21-
$mock->expects($this->any())->method('getDefaultOptions')->will($this->returnValue(['test' => false]));
22-
$mock->expects($this->any())->method('supports')->will($this->returnValue(true));
21+
$mock->expects($this->any())->method('getDefaultOptions')->willReturn(['test' => false]);
22+
$mock->expects($this->any())->method('supports')->willReturn(true);
2323
$mock->expects($this->any())->method('encode')->will($this->returnCallback(
2424
function ($value, $depth, $options, $encoder) {
2525
return !empty($options['test']) ? strtoupper($value) : $value;

tests/tests/ObjectEncodingTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testPHPValue()
5454
->getMock();
5555

5656
$encoder = new PHPEncoder();
57-
$mock->expects($this->once())->method('toPHPValue')->will($this->returnValue([]));
57+
$mock->expects($this->once())->method('toPHPValue')->willReturn([]);
5858
$this->assertSame([], eval('return ' . $encoder->encode($mock) . ';'));
5959
}
6060

@@ -65,7 +65,7 @@ public function testPHP()
6565
->getMock();
6666

6767
$encoder = new PHPEncoder();
68-
$mock->expects($this->once())->method('toPHP')->will($this->returnValue('"Mocked"'));
68+
$mock->expects($this->once())->method('toPHP')->willReturn('"Mocked"');
6969
$this->assertSame('"Mocked"', $encoder->encode($mock));
7070
}
7171

0 commit comments

Comments
 (0)