X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Ftests%2FCacheCommandTest.php;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FCacheCommandTest.php;h=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=12c92bdee822ced5d646aeaf110363752346e2ec;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/drush/drush/tests/CacheCommandTest.php b/vendor/drush/drush/tests/CacheCommandTest.php deleted file mode 100644 index 12c92bdee..000000000 --- a/vendor/drush/drush/tests/CacheCommandTest.php +++ /dev/null @@ -1,58 +0,0 @@ -getSites()) { - $this->setUpDrupal(1, true); - } - } - - public function testCacheGet() - { - // Test the cache get command. - $this->drush('cache-get', ['system.date', 'config'], ['format' => 'json']); - $schema = $this->getOutputFromJSON('data'); - $this->assertNotEmpty($schema); - - // Test that get-ing a non-existant cid fails. - $this->drush('cache-get', ['test-failure-cid'], ['format' => 'json'], null, null, self::EXIT_ERROR); - } - - public function testCacheSet() - { - // Test setting a new cache item. - $expected = 'cache test string'; - $this->drush('cache-set', ['cache-test-cid', $expected]); - $this->drush('cache-get', ['cache-test-cid'], ['format' => 'json']); - $data = $this->getOutputFromJSON('data'); - $this->assertEquals($expected, $data); - - // Test cache-set using all arguments and many options. - $expected = ['key' => 'value']; - $input = ['data'=> $expected]; - $stdin = json_encode($input); - $bin = 'default'; - $exec = sprintf('%s cache-set %s %s my_cache_id - %s CACHE_PERMANENT --input-format=json --cache-get 2>%s', self::getDrush(), "--root=" . self::escapeshellarg($this->webroot()), '--uri=' . $this->getUri(), $bin, $this->bitBucket()); - $return = $this->execute($exec, self::EXIT_SUCCESS, null, [], $stdin); - $this->drush('cache-get', ['my_cache_id'], ['format' => 'json']); - $data = $this->getOutputFromJSON('data'); - $this->assertEquals((object)$expected, $data); - } - - public function testCacheRebuild() - { - // Test cache-clear all and cache-rebuild (D8+). - $this->drush('cache-rebuild'); - $this->drush('cache-get', ['cache-test-cid'], ['format' => 'json'], null, null, self::EXIT_ERROR); - } -}