<commit_before>--TEST--
Section item level menu
--FILE--
<?php
namespace cs;
include __DIR__.'/../custom_loader.php';
current_module('System');
Event::instance_stub();
$Menu = Menu::instance();
$Menu->add_section_item(
	'System',
	'Section 1',
	[
		'href'    => "System/section1",
		'primary' => 'uk-active'
	]
);
$Menu->add_item(
	'System',
	'Section 1 item 1',
	[
		'href'    => "System/section1/item1",
		'primary' => true
	]
);
$Menu->add_item(
	'System',
	'Section 1 item 2',
	[
		'href' => "System/section1/item2"
	]
);
$Menu->add_item(
	'System',
	'Section 1 item 3',
	[
		'href'    => "System/section1/item3",
		'primary' => true
	]
);
$Menu->add_section_item(
	'System',
	'Section 2',
	[
		'href' => "System/section2"
	]
);
$Menu->add_section_item(
	'System',
	'Section 3',
	[
		'href' => "System/section3"
	]
);
echo $Menu->get_menu();
?>
--EXPECT--
<nav is="cs-nav-button-group">
	<button icon-after="caret-down" is="cs-button" primary="uk-active" type="button">Section 1</button>
	<nav is="cs-nav-dropdown">
		<nav vertical is="cs-nav-button-group">
			<a href="System/section1/item1" is="cs-link-button" primary>Section 1 item 1</a>
			<a href="System/section1/item2" is="cs-link-button">Section 1 item 2</a>
			<a href="System/section1/item3" is="cs-link-button" primary>Section 1 item 3</a>
		</nav>
	</nav>
	<button icon-after="caret-down" is="cs-button" type="button">Section 2</button>
	<button icon-after="caret-down" is="cs-button" type="button">Section 3</button>
</nav>
<commit_msg>Test fix for PHP7 because of: https://bugs.php.net/bug.php?id=70289<commit_after>--TEST--
Section item level menu
--FILE--
<?php
namespace cs;
include __DIR__.'/../custom_loader.php';
current_module('System');
Event::instance_stub();
$Menu = Menu::instance();
$Menu->add_section_item(
	'System',
	'Section 1',
	[
		'href'    => "System/section1",
		'primary' => true
	]
);
$Menu->add_item(
	'System',
	'Section 1 item 1',
	[
		'href'    => "System/section1/item1",
		'primary' => true
	]
);
$Menu->add_item(
	'System',
	'Section 1 item 2',
	[
		'href' => "System/section1/item2"
	]
);
$Menu->add_item(
	'System',
	'Section 1 item 3',
	[
		'href'    => "System/section1/item3",
		'primary' => true
	]
);
$Menu->add_section_item(
	'System',
	'Section 2',
	[
		'href' => "System/section2"
	]
);
$Menu->add_section_item(
	'System',
	'Section 3',
	[
		'href' => "System/section3"
	]
);
echo $Menu->get_menu();
?>
--EXPECTF--
<nav is="cs-nav-button-group">
	<button icon-after="caret-down" is="cs-button" primary type="button">Section 1</button>
	<nav is="cs-nav-dropdown">
		<nav%sis="cs-nav-button-group"%S>
			<a href="System/section1/item1" is="cs-link-button" primary>Section 1 item 1</a>
			<a href="System/section1/item2" is="cs-link-button">Section 1 item 2</a>
			<a href="System/section1/item3" is="cs-link-button" primary>Section 1 item 3</a>
		</nav>
	</nav>
	<button icon-after="caret-down" is="cs-button" type="button">Section 2</button>
	<button icon-after="caret-down" is="cs-button" type="button">Section 3</button>
</nav>

{'fraction_non_alphanumeric': 0.2195523370638578, 'fraction_numerical': 0.02369980250164582, 'mean_word_length': 4.2668977469670715, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 73, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6419697', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1216, 'n_words': 228}