diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-26 17:13:09 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-26 17:13:09 +0300 |
commit | 1336f44a68a46c197ea6836c52f0f22b6dac7778 (patch) | |
tree | 44d1fbd455d68290846e3c9c38d1faabca17acb6 /tests | |
parent | 3e0cfa6c320701976cd41954498ba26fc5ccf43d (diff) |
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Command/Integrity/SignAppTest.php | 10 | ||||
-rw-r--r-- | tests/lib/Command/Integrity/SignCoreTest.php | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index 594d17168d6..6802542914f 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -76,7 +76,7 @@ class SignAppTest extends TestCase { ->method('writeln') ->with('This command requires the --path, --privateKey and --certificate.'); - $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithMissingPrivateKey() { @@ -104,7 +104,7 @@ class SignAppTest extends TestCase { ->method('writeln') ->with('This command requires the --path, --privateKey and --certificate.'); - $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithMissingCertificate() { @@ -132,7 +132,7 @@ class SignAppTest extends TestCase { ->method('writeln') ->with('This command requires the --path, --privateKey and --certificate.'); - $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithNotExistingPrivateKey() { @@ -166,7 +166,7 @@ class SignAppTest extends TestCase { ->method('writeln') ->with('Private key "privateKey" does not exists.'); - $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithNotExistingCertificate() { @@ -205,7 +205,7 @@ class SignAppTest extends TestCase { ->method('writeln') ->with('Certificate "certificate" does not exists.'); - $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithException() { diff --git a/tests/lib/Command/Integrity/SignCoreTest.php b/tests/lib/Command/Integrity/SignCoreTest.php index 36376ef0e7d..27e4f66c242 100644 --- a/tests/lib/Command/Integrity/SignCoreTest.php +++ b/tests/lib/Command/Integrity/SignCoreTest.php @@ -66,7 +66,7 @@ class SignCoreTest extends TestCase { ->method('writeln') ->with('--privateKey, --certificate and --path are required.'); - $this->assertNull(self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithMissingCertificate() { @@ -89,7 +89,7 @@ class SignCoreTest extends TestCase { ->method('writeln') ->with('--privateKey, --certificate and --path are required.'); - $this->assertNull(self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithNotExistingPrivateKey() { @@ -123,7 +123,7 @@ class SignCoreTest extends TestCase { ->method('writeln') ->with('Private key "privateKey" does not exists.'); - $this->assertNull(self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithNotExistingCertificate() { @@ -162,7 +162,7 @@ class SignCoreTest extends TestCase { ->method('writeln') ->with('Certificate "certificate" does not exists.'); - $this->assertNull(self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); + $this->assertSame(1, self::invokePrivate($this->signCore, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithException() { |