@@ -1735,4 +1735,71 @@ public function testSoftDeleteWithTableJoinsFirst()
17351735 // Just making sure it didn't throw ambiguous deleted error
17361736 $ this ->assertEquals (1 , $ results ->id );
17371737 }
1738+
1739+ //--------------------------------------------------------------------
1740+
1741+ public function testMagicIssetTrue ()
1742+ {
1743+ $ model = new UserModel ();
1744+
1745+ $ this ->assertTrue (isset ($ model ->table ));
1746+ }
1747+
1748+ public function testMagicIssetFalse ()
1749+ {
1750+ $ model = new UserModel ();
1751+
1752+ $ this ->assertFalse (isset ($ model ->foobar ));
1753+ }
1754+
1755+ public function testMagicIssetWithNewProperty ()
1756+ {
1757+ $ model = new UserModel ();
1758+
1759+ $ model ->flavor = 'chocolate ' ;
1760+
1761+ $ this ->assertTrue (isset ($ model ->flavor ));
1762+ }
1763+
1764+ public function testMagicIssetFromDb ()
1765+ {
1766+ $ model = new UserModel ();
1767+
1768+ $ this ->assertTrue (isset ($ model ->DBPrefix ));
1769+ }
1770+
1771+ public function testMagicIssetFromBuilder ()
1772+ {
1773+ $ model = new UserModel ();
1774+
1775+ $ this ->assertTrue (isset ($ model ->canLimitDeletes ));
1776+ }
1777+
1778+ public function testMagicGet ()
1779+ {
1780+ $ model = new UserModel ();
1781+
1782+ $ this ->assertEquals ('user ' , $ model ->table );
1783+ }
1784+
1785+ public function testMagicGetMissing ()
1786+ {
1787+ $ model = new UserModel ();
1788+
1789+ $ this ->assertNull ($ model ->foobar );
1790+ }
1791+
1792+ public function testMagicGetFromDB ()
1793+ {
1794+ $ model = new UserModel ();
1795+
1796+ $ this ->assertEquals ('utf8 ' , $ model ->charset );
1797+ }
1798+
1799+ public function testMagicGetFromBuilder ()
1800+ {
1801+ $ model = new UserModel ();
1802+
1803+ $ this ->assertIsBool ($ model ->canLimitDeletes );
1804+ }
17381805}
0 commit comments