/** * Tests a <table> tag used for joins * <table name="module_categories" alias="module_categories" type="left join"> * <conditions> * <condition operation="equal" column="module_categories.module_category_srl" default="modules.module_category_srl" /> * </conditions> * </table> * */ function testTableTagWithJoinCondition() { $xml_file = $this->xmlPath . "table_name_alias_type.xml"; $xml_obj = Helper::getXmlObject($xml_file); $tag = new TableTag($xml_obj->table); $actual = $tag->getTableString(); $expected = 'new JoinTable(\'"xe_module_categories"\', \'"module_categories"\', "left join", array( new ConditionGroup(array( new ConditionWithoutArgument(\'"module_categories"."module_category_srl"\',\'"modules"."module_category_srl"\',"equal") )) ))'; $actual = Helper::cleanString($actual); $expected = Helper::cleanString($expected); $this->assertEquals($expected, $actual); }