diff --git a/build/code-sniffer-ruleset-tests.xml b/build/code-sniffer-ruleset-tests.xml index 7169012e..17f00d1d 100644 --- a/build/code-sniffer-ruleset-tests.xml +++ b/build/code-sniffer-ruleset-tests.xml @@ -11,6 +11,7 @@ using underscore. --> + diff --git a/tests/Functional/Net/SFTPUserStoryTest.php b/tests/Functional/Net/SFTPUserStoryTest.php index 0eec5ece..015fea03 100644 --- a/tests/Functional/Net/SFTPUserStoryTest.php +++ b/tests/Functional/Net/SFTPUserStoryTest.php @@ -151,7 +151,7 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase public function testPutSizeGetFile($sftp) { $this->assertTrue( - $sftp->put('file1.txt', array(__CLASS__, 'demoCallback'), NET_SFTP_CALLBACK), + $sftp->put('file1.txt', self::$exampleData), 'Failed asserting that example data could be successfully put().' ); @@ -170,16 +170,6 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase return $sftp; } - static function callback($length) - { - $r = substr(self::$buffer, 0, $length); - self::$buffer = substr(self::$buffer, $length); - if (strlen($r)) { - return $r; - } - return null; - } - /** * @depends testStatOnDir */ @@ -187,7 +177,7 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase { self::$buffer = self::$exampleData; $this->assertTrue( - $sftp->put('file1.txt', array(__CLASS__, 'callback'), $sftp::SOURCE_CALLBACK), + $sftp->put('file1.txt', array(__CLASS__, 'demoCallback'), $sftp::SOURCE_CALLBACK), 'Failed asserting that example data could be successfully put().' ); diff --git a/tests/Unit/Crypt/Hash/SHA256_96Test.php b/tests/Unit/Crypt/Hash/SHA256_96Test.php index e7a950cc..cc354b5d 100644 --- a/tests/Unit/Crypt/Hash/SHA256_96Test.php +++ b/tests/Unit/Crypt/Hash/SHA256_96Test.php @@ -35,7 +35,7 @@ class SHA256_96Test extends SHA256Test { public function getInstance() { - return new Crypt_Hash('sha256-96'); + return new Hash('sha256-96'); } /** diff --git a/tests/Unit/Crypt/Hash/SHA512_96Test.php b/tests/Unit/Crypt/Hash/SHA512_96Test.php index 6ee9ede0..67f00ba2 100644 --- a/tests/Unit/Crypt/Hash/SHA512_96Test.php +++ b/tests/Unit/Crypt/Hash/SHA512_96Test.php @@ -35,7 +35,7 @@ class SHA512_96Test extends SHA512Test { public function getInstance() { - return new Crypt_Hash('sha512-96'); + return new Hash('sha512-96'); } /** diff --git a/tests/Unit/Crypt/RSA/LoadKeyTest.php b/tests/Unit/Crypt/RSA/LoadKeyTest.php index 6bec9875..31c3e1c8 100644 --- a/tests/Unit/Crypt/RSA/LoadKeyTest.php +++ b/tests/Unit/Crypt/RSA/LoadKeyTest.php @@ -184,13 +184,8 @@ U9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ $this->assertTrue($rsa->loadKey($key)); -<<<<<<< HEAD $key = $rsa->getPrivateKey(RSA::PRIVATE_FORMAT_PKCS8); - $this->assertInternalType('string', $key); -======= - $key = $rsa->getPrivateKey(CRYPT_RSA_PRIVATE_FORMAT_PKCS8); $this->assertIsString($key); ->>>>>>> 1.0 $this->assertTrue($rsa->loadKey($key)); }