Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix risky test without assertion #32761

Closed
Closed
Show file tree
Hide file tree
Changes from 2 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
7 changes: 5 additions & 2 deletions tests/lib/Files/Node/FolderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,14 @@ public function testGet() {
->method('getUser')
->willReturn($this->user);

$expected = $this->createMock(Node::class);
$root->method('get')
->with('/bar/foo/asd');
->with('/bar/foo/asd')
->willReturn($expected);

$node = new Folder($root, $view, '/bar/foo');
$node->get('asd');
$return = $node->get('asd');
self::assertEquals($expected, $return);
}

public function testNodeExists() {
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit-autotest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="bootstrap.php"
verbose="true"
failOnRisky="true"
backupGlobals="false"
timeoutForSmallTests="900"
timeoutForMediumTests="900"
Expand Down