Browse Source

Removed nullable return from Table::getBehavior()

Dustin Haggard 8 years ago
parent
commit
e205edae27
2 changed files with 1 additions and 4 deletions
  1. 1 1
      src/ORM/Table.php
  2. 0 3
      tests/TestCase/ORM/TableTest.php

+ 1 - 1
src/ORM/Table.php

@@ -926,7 +926,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
      * Get a behavior from the registry.
      *
      * @param string $name The behavior alias to get from the registry.
-     * @return \Cake\ORM\Behavior|null
+     * @return \Cake\ORM\Behavior
      */
     public function getBehavior($name)
     {

+ 0 - 3
tests/TestCase/ORM/TableTest.php

@@ -1795,10 +1795,7 @@ class TableTest extends TestCase
     {
         $table = new Table(['table' => 'comments']);
         $table->addBehavior('Sluggable');
-
         $this->assertSame($table->behaviors()->get('Sluggable'), $table->getBehavior('Sluggable'));
-        $this->assertFalse($table->hasBehavior('FakeBehavior'));
-        $this->assertNull($table->getBehavior('FakeBehavior'));
     }
 
     /**