public function testParse()
 {
     $path = CakePlugin::path('Translations') . 'Test/Files/simple.plist';
     $result = PlistParser::parse($path);
     $expected = array('count' => 1, 'translations' => array(array('locale' => 'en', 'domain' => 'default', 'category' => 'LC_MESSAGES', 'key' => 'foo', 'value' => 'foo value')));
     $this->assertSame($expected, $result);
 }
Example #2
0
<?php

require_once 'PlistParser.php';
require_once 'functions.php';
$taskID = $_POST['taskID'];
$name = $_POST['name'];
addTask($taskID, $name);
$pending_tasks = getPendingTasks();
$pp = new PlistParser();
$plist = $pp->convertIntoPlist($pending_tasks, true);
echo $plist;