Skip to content

Commit

Permalink
Inline condition and fix skip check.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 13, 2017
1 parent 891406b commit 0d4c280
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Cache/Engine/MemcachedEngine.php
Expand Up @@ -174,7 +174,7 @@ public function init(array $config = [])

if ($this->_config['username'] !== null && $this->_config['password'] !== null) {
$sasl = method_exists($this->_Memcached, 'setSaslAuthData');
if (!$sasl) {
if (!method_exists($this->_Memcached, 'setSaslAuthData')) {
throw new InvalidArgumentException(
'Memcached extension is not built with SASL support'
);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Cache/Engine/MemcachedEngineTest.php
Expand Up @@ -345,7 +345,7 @@ public function testIgbinarySerializerThrowException()
public function testSaslAuthException()
{
$this->skipIf(
method_exists('setSaslAuthData', Memcached::class),
method_exists(Memcached::class, 'setSaslAuthData'),
'Cannot test exception when sasl has been compiled in.'
);
$MemcachedEngine = new MemcachedEngine();
Expand Down

0 comments on commit 0d4c280

Please sign in to comment.