Commit 52c21df1 authored by Thomas Citharel's avatar Thomas Citharel 🏃🏻

Try tests

parent c187909b
before_script:
# Install composer dependencies
- bash ci/docker_install.sh
# We test PHP7.0
test:7.0:
image: php:7.0
script:
- ant prepare-sqlite
- phpunit -v --colors
# We test PHP7.1
test:7.1:
image: php:7.1
script:
- ant prepare-sqlite
- phpunit -v --colors
cache:
paths:
- vendor/
\ No newline at end of file
......@@ -34,6 +34,7 @@ class AppKernel extends Kernel
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}
return $bundles;
......
......@@ -4,7 +4,7 @@
<div class="container ombre">
<div class="col-md-6 col-md-offset-3">
<div class="header">
<h4 class="modal-title" id="templateModalTitle">{{ 'templates.title' | trans({ '%presentation%': presentation.title }) }}</h4>
<h4 class="modal-title">{{ 'templates.title' | trans({ '%presentation%': presentation.title }) }}</h4>
{% for flashMessage in app.session.flashbag.get('notice') %}
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
......
......@@ -4,7 +4,7 @@
<div class="container ombre">
<div class="col-md-6 col-md-offset-3">
<div class="header">
<h4 class="modal-title" id="templateModalTitle">{{ 'group.new.title' | trans }}</h4>
<h4 class="modal-title">{{ 'group.new.title' | trans }}</h4>
<div class="alert alert-warning alert-dismissible fade in hidden" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <strong>{{ 'errors.default' | trans }}</strong> </div>
<div class="alert alert-info alert-dismissible fade in hidden" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <strong>{{ 'info.default' | trans }}</strong> <span class="desc"></span></div>
</div>
......
......@@ -4,7 +4,7 @@
<div class="container ombre">
<div class="col-md-6 col-md-offset-3">
<div class="header">
<h4 class="modal-title" id="templateModalTitle">{{ 'templates.title' | trans({ '%presentation%': presentation.title }) }}</h4>
<h4 class="modal-title">{{ 'templates.title' | trans({ '%presentation%': presentation.title }) }}</h4>
{% for flashMessage in app.session.flashbag.get('notice') %}
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
......
......@@ -93,7 +93,7 @@ swiftmailer:
fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
firewall_name: secured_area
user_class: Strut\UserBundle\Entity\User
registration:
confirmation:
......
imports:
- { resource: config_dev.yml }
- { resource: parameters_test.yml }
framework:
test: ~
......@@ -7,10 +8,32 @@ framework:
storage_id: session.storage.mock_file
profiler:
collect: false
translator:
enabled: false
web_profiler:
toolbar: false
intercept_redirects: false
swiftmailer:
disable_delivery: true
# to be able to read emails sent
spool:
type: file
doctrine:
dbal:
driver: "%test_database_driver%"
host: "%test_database_host%"
port: "%test_database_port%"
dbname: "%test_database_name%"
user: "%test_database_user%"
password: "%test_database_password%"
charset: "%test_database_charset%"
path: "%test_database_path%"
orm:
metadata_cache_driver:
type: service
id: filesystem_cache
query_cache_driver:
type: service
id: filesystem_cache
parameters:
test_database_driver: pdo_sqlite
test_database_host: localhost
test_database_port:
test_database_name: ~
test_database_user: ~
test_database_password: ~
test_database_path: "%kernel.root_dir%/../data/db/framaslides_test.sqlite"
test_database_charset: utf8
......@@ -43,7 +43,7 @@ security:
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/, role: ROLE_ADMIN }
- { path: ^/users/, role: ROLE_ADMIN }
- { path: ^/users, role: ROLE_ADMIN }
- { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/picture/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: ROLE_USER }
......@@ -91,4 +91,9 @@ services:
- "%pictures_directory%"
- "@logger"
tags:
- { name: doctrine.event_listener, event: postRemove }
\ No newline at end of file
- { name: doctrine.event_listener, event: postRemove }
filesystem_cache:
class: Doctrine\Common\Cache\FilesystemCache
arguments:
- "%kernel.cache_dir%/doctrine/metadata"
\ No newline at end of file
parameters:
test_database_driver: pdo_mysql
test_database_host: localhost
test_database_port: 3306
test_database_name: framaslides_test
test_database_user: root
test_database_password: ~
test_database_path: ~
test_database_charset: utf8mb4
parameters:
test_database_driver: pdo_pgsql
test_database_host: localhost
test_database_port:
test_database_name: framaslides_test
test_database_user: travis
test_database_password: ~
test_database_path: ~
test_database_charset: utf8
parameters:
test_database_driver: pdo_sqlite
test_database_host: localhost
test_database_port:
test_database_name: ~
test_database_user: ~
test_database_password: ~
test_database_path: "%kernel.root_dir%/../data/db/framaslides_test.sqlite"
test_database_charset: utf8
<?xml version="1.0" encoding="UTF-8"?>
<project name="framaslides" default="build">
<target name="build" depends="clean,prepare,phpunit"/>
<target name="prepare-mysql" depends="clean,prepare_mysql"/>
<target name="prepare-sqlite" depends="clean,prepare_sqlite"/>
<target name="prepare-pgsql" depends="clean,prepare_pgsql"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/var/cache"/>
</target>
<target name="prepare" description="Prepare for build">
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:drop"/>
<arg value="--force"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:create"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:schema:create"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:fixtures:load"/>
<arg value="--no-interaction"/>
<arg value="--env=test"/>
</exec>
</target>
<target name="prepare_mysql" description="Run test for MySQL">
<delete dir="${basedir}/app/config/parameters.yml"/>
<exec executable="cp">
<arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
<arg value="${basedir}/app/config/parameters_test.yml"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="cache:clear"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:drop"/>
<arg value="--force"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:create"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:import"/>
<arg value="data/sql/mysql_base.sql"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:migrations:migrate"/>
<arg value="--no-interaction"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:fixtures:load"/>
<arg value="--no-interaction"/>
<arg value="--env=test"/>
</exec>
</target>
<target name="prepare_sqlite" description="Run test for SQLite">
<delete dir="${basedir}/app/config/parameters.yml"/>
<exec executable="cp">
<arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
<arg value="${basedir}/app/config/parameters_test.yml"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="cache:clear"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:drop"/>
<arg value="--force"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:create"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:schema:create"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:migrations:migrate"/>
<arg value="--no-interaction"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:fixtures:load"/>
<arg value="--no-interaction"/>
<arg value="--env=test"/>
</exec>
</target>
<target name="prepare_pgsql" description="Run test for PostgreSQL">
<delete dir="${basedir}/app/config/parameters.yml"/>
<exec executable="cp">
<arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
<arg value="${basedir}/app/config/parameters_test.yml"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="cache:clear"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:drop"/>
<arg value="--force"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:database:create"/>
<arg value="--env=test"/>
</exec>
<exec executable="psql">
<arg value="-h"/>
<arg value="localhost"/>
<arg value="-d"/>
<arg value="framaslides_test"/>
<arg value="-U"/>
<arg value="travis"/>
<arg value="-f"/>
<arg value="data/sql/pgsql_base.sql"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:migrations:migrate"/>
<arg value="--no-interaction"/>
<arg value="--env=test"/>
</exec>
<exec executable="php">
<arg value="${basedir}/bin/console"/>
<arg value="doctrine:fixtures:load"/>
<arg value="--no-interaction"/>
<arg value="--env=test"/>
</exec>
</target>
<target name="phpunit" description="Run unit tests with PHPUnit + HTML Coverage">
<exec executable="phpunit" failonerror="true">
<arg value="--coverage-html"/>
<arg value="build/coverage"/>
</exec>
</target>
</project>
#!/bin/bash
# We need to install dependencies only for Docker
[[ ! -e /.dockerenv ]] && exit 0
set -xe
# Install nodejs
echo 'deb http://deb.nodesource.com/node_6.x jessie main' > /etc/apt/sources.list.d/nodesource.list
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
# Install other requirements
apt-get update -yqq
apt-get install git wget libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev nodejs build-essential bzip2 -yqq
npm i
grunt build
# Compile PHP, include these extensions.
docker-php-ext-install mbstring mcrypt pdo_sqlite curl json intl gd xml zip bz2 opcache
wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php'); unlink('installer.sig');"
php composer.phar install
# Install phpunit, the tool that we will use for testing
curl --location --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
chmod +x /usr/local/bin/phpunit
\ No newline at end of file
......@@ -38,7 +38,8 @@
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
"symfony/phpunit-bridge": "^3.0",
"doctrine/doctrine-fixtures-bundle": "^2.3"
},
"scripts": {
"symfony-scripts": [
......
......@@ -10,6 +10,7 @@
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_DIR" value="app/" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>
<testsuites>
......@@ -22,6 +23,7 @@
<whitelist>
<directory>src</directory>
<exclude>
<directory>vendor</directory>
<directory>src/*Bundle/Resources</directory>
<directory>src/*/*Bundle/Resources</directory>
<directory>src/*/Bundle/*Bundle/Resources</directory>
......
......@@ -208,38 +208,6 @@ class PresentationController extends Controller
]);
}
/**
* @Route("/preview/{presentation}/", name="preview", requirements={"presentation": "\d+"})
* @param Presentation $presentation
* @param $type
* @return Response
*/
public function previewPresentationAction(Presentation $presentation, string $type = "impress"): Response
{
$this->get('strut.check_rights')->checkUserPresentationAction($this->getUser(), $presentation);
switch ($type) {
case 'impress':
return $this->render('@Strut/preview_export/impress.html', [
'presentation' => $presentation
]);
case 'bespoke':
return $this->render('@Strut/preview_export/bespoke.html', [
'presentation' => $presentation
]);
case 'handouts':
return $this->render('@Strut/preview_export/handouts.html', [
'presentation' => $presentation
]);
default:
return new JsonResponse(null, 406);
}
}
/**
* @Route("/versions/purge/{presentation}", name="purge-version")
* @param Presentation $presentation
......
{"slides":[{"components":[{"TextBox":{},"x":195,"y":95,"scale":{"x":1,"y":1},"type":"TextBox","text":"Bonjour !<br>","size":143,"selected":false},{"TextBox":{},"x":102,"y":274,"scale":{"x":1,"y":1},"type":"TextBox","text":"Ceci est un exemple de pr\u00e9sentation r\u00e9alis\u00e9e avec <font color=\"#000000\">Framaslides<\/font><br>","size":30,"selected":false},{"src":"https:\/\/framaslides.org\/picture\/58528e2d6cc410.12899907","type":"Image","x":335,"y":438,"scale":{"x":0.57782101167315,"y":0.57782101167315,"width":297,"height":270.42023346304},"imageType":"12899907","selected":false},{"TextBox":{},"x":267,"y":358,"scale":{"x":1,"y":1},"type":"TextBox","text":"<a href=\"https:\/\/framaslides.org\"><font target=\"_blank\" color=\"#8e2525\"><font color=\"#78258e\">Frama<\/font><font color=\"#03bc04\">slides<\/font><\/font><\/a> est un service propos\u00e9 par Framasoft<br>&nbsp;dans le cadre de sa campagne <a href=\"https:\/\/degooglisons-internet.org\">D\u00e9googlisons Internet<\/a> <br>","size":20,"selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":0,"selected":false,"active":false,"x":942,"y":488},{"components":[{"TextBox":{},"x":45,"y":56,"scale":{"x":1,"y":1},"type":"TextBox","text":"Framaslides permet de : <br>","size":72,"selected":false},{"TextBox":{},"x":139,"y":245,"scale":{"x":1,"y":1},"type":"TextBox","text":"<ul><li>\u00c9diter ses slides<\/li><li>Les sauvegarder<\/li><li>En faire des mod\u00e8les<\/li><li>Les partager<br><\/li><\/ul>","size":72,"selected":false}],"z":0,"impScale":3,"rotateX":-1.06,"rotateY":0,"rotateZ":0,"index":1,"selected":false,"active":false,"x":226,"y":731},{"components":[{"TextBox":{},"x":45,"y":22,"scale":{"x":1,"y":1},"type":"TextBox","text":"Formatage du texte<br>","size":72,"selected":false},{"TextBox":{},"x":29,"y":137,"scale":{"x":1,"y":1},"type":"TextBox","text":"<div align=\"center\">Lorem ipsum dolor sit amet, consectetur adipisicing elit. <br>Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo <br>reprehenderit optio amet ab temporibus asperiores quasi cupiditate. <br>Voluptatum ducimus voluptates voluptas?<\/div>","size":13,"selected":false},{"TextBox":{},"x":25,"y":248,"scale":{"x":1,"y":1},"type":"TextBox","size":26,"text":"<font face=\"'Droid Sans Mono', monospace\">Lorem ipsum dolor sit amet, consectetur adipisicing elit.<\/font><br><font face=\"'Ubuntu', sans-serif\">Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo<\/font><br><font face=\"'Fredoka One', cursive\">reprehenderit optio amet ab temporibus asperiores quasi cupiditate.<\/font><br><font face=\"'PressStart2P', cursive\">Voluptatum ducimus voluptates voluptas?<\/font>","selected":false},{"TextBox":{},"x":41,"y":418,"scale":{"x":1,"y":1},"type":"TextBox","size":21,"text":"<font color=\"#8e2525\">Lorem ipsum dolor sit amet, consectetur adipisicing elit.<\/font><br><font color=\"#19b216\">Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo<\/font><br><font color=\"#2810b6\">reprehenderit optio amet ab temporibus asperiores quasi cupiditate.<\/font><br><font color=\"#afcb07\">Voluptatum ducimus voluptates voluptas?<\/font>","selected":false},{"TextBox":{},"x":479,"y":134,"scale":{"x":1,"y":1},"type":"TextBox","size":15,"text":"Lorem ipsum dolor sit amet, <b>consectetur<\/b> adipisicing <i>elit<\/i>.<br>Eligendi non quis <i>exercitationem<\/i> culpa nesciunt nihil aut nostrum explicabo<br>reprehenderit optio amet ab <b>temporibus<\/b> asperiores quasi cupiditate.<br>Voluptatum ducimus voluptates voluptas?<br>","selected":false},{"TextBox":{},"x":81,"y":545,"scale":{"x":1,"y":1},"type":"TextBox","size":71,"text":"<ul><li><font color=\"#8e2525\" face=\"'Lato', sans-serif\">item<\/font><\/li><li><font color=\"#8e2525\"><font face=\"PressStart2P\"><font face=\"'Lato', sans-serif\">idem<\/font><br><\/font><\/font><\/li><\/ul>","selected":false},{"TextBox":{},"x":504,"y":558,"scale":{"x":1,"y":1},"type":"TextBox","size":45,"text":"<ol><li><font color=\"#100d98\" face=\"'Lato', sans-serif\">D'abord<\/font><\/li><li><font face=\"PressStart2P\"><font color=\"#0b8374\" face=\"'Lato', sans-serif\">Ensuite<\/font><br><\/font><\/li><\/ol>","selected":false}],"z":0,"impScale":3,"rotateX":0.74,"rotateY":0,"rotateZ":0.52,"index":2,"selected":false,"active":false,"x":227,"y":433},{"components":[{"TextBox":{},"x":107,"y":25,"scale":{"x":1,"y":1},"type":"TextBox","size":63,"text":"<font face=\"'Lato', sans-serif\">Images<\/font>","selected":false},{"src":"https:\/\/framaslides.org\/picture\/585293d98e8867.79147666","type":"Image","x":143,"y":158,"scale":{"x":0.7046875,"y":0.7046875,"width":451,"height":300.196875},"imageType":"79147666","selected":false,"rotate":0.33,"skewX":0,"skewY":-0.79},{"src":"https:\/\/framaslides.org\/picture\/585293fb12bf80.58577370","type":"Image","x":449,"y":320,"scale":{"x":1,"y":1},"imageType":"58577370","selected":false,"rotate":0.15}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":3,"selected":false,"active":false,"x":355,"y":138},{"components":[{"TextBox":{},"x":77,"y":31,"scale":{"x":1,"y":1},"type":"TextBox","size":86,"text":"Vid\u00e9os","selected":false},{"src":"https:\/\/www.youtube.com\/watch?v=npZmKjTxsQE","type":"Video","x":116,"y":161,"scale":{"width":729.57112868567,"height":494.17614084232},"shortSrc":"npZmKjTxsQE","videoType":"youtube","srcType":"yt","selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0.35,"index":4,"selected":false,"active":false,"x":868,"y":189},{"components":[{"TextBox":{},"x":66,"y":26,"scale":{"x":1,"y":1},"type":"TextBox","size":63,"text":"Site web<br>","selected":false},{"src":"https:\/\/framasoft.org\/","type":"WebFrame","x":95,"y":97,"scale":{"x":0.846875,"y":0.846875,"width":813,"height":650.4},"selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":5,"selected":false,"active":false,"x":1456,"y":127},{"components":[{"TextBox":{},"x":46,"y":25,"scale":{"x":1,"y":1},"type":"TextBox","size":59,"text":"Des formes<br>","selected":false},{"markup":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" viewBox=\"0 0 50 50\" preserveAspectRatio=\"none\"><rect width=\"50\" height=\"50\"\/><\/svg>","type":"Shape","x":259,"y":516,"scale":{"width":145.12806706545,"height":151.84022970871},"selected":false,"fill":"#712bee","skewX":-1.02},{"markup":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.1\" viewBox=\"0 0 50 50\" preserveAspectRatio=\"none\"><polygon points=\"25,0 50,50 0,50\"\/><\/svg>","type":"Shape","x":350,"y":196,"scale":{"width":100,"height":100},"selected":false,"rotate":2.2,"fill":"#0bc557"},{"markup":"<svg xmlns:svg=\"http:\/\/www.w3.org\/2000\/svg\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 645 585\" preserveAspectRatio=\"none\"><defs id=\"defs4\" \/><g id=\"layer1\"><path d=\"M 297.29747,550.86823 C 283.52243,535.43191 249.1268,505.33855 220.86277,483.99412 C 137.11867,420.75228 125.72108,411.5999 91.719238,380.29088 C 29.03471,322.57071 2.413622,264.58086 2.5048478,185.95124 C 2.5493594,147.56739 5.1656152,132.77929 15.914734,110.15398 C 34.151433,71.768267 61.014996,43.244667 95.360052,25.799457 C 119.68545,13.443675 131.6827,7.9542046 172.30448,7.7296236 C 214.79777,7.4947896 223.74311,12.449347 248.73919,26.181459 C 279.1637,42.895777 310.47909,78.617167 316.95242,103.99205 L 320.95052,119.66445 L 330.81015,98.079942 C 386.52632,-23.892986 564.40851,-22.06811 626.31244,101.11153 C 645.95011,140.18758 648.10608,223.6247 630.69256,270.6244 C 607.97729,331.93377 565.31255,378.67493 466.68622,450.30098 C 402.0054,497.27462 328.80148,568.34684 323.70555,578.32901 C 317.79007,589.91654 323.42339,580.14491 297.29747,550.86823 z\" id=\"path2417\"\/><g transform=\"translate(129.28571,-64.285714)\" id=\"g2221\"\/><\/g><\/svg>","type":"Shape","x":404,"y":354,"scale":{"width":100,"height":100},"selected":false,"fill":"#bb0bc5"},{"markup":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 466 466\" preserveAspectRatio=\"none\"><circle cx=\"233\" cy=\"233\" r=\"231\"\/><path d=\"M 233,459 a 226 226 0 0 1 0,-452 a 113 113 0 0 1 0,226 z\" fill=\"#fff\"\/><circle cx=\"233\" cy=\"346\" r=\"113\"\/><circle cx=\"233\" cy=\"120\" r=\"30\"\/><circle cx=\"233\" cy=\"346\" r=\"30\" fill=\"#fff\"\/><\/svg>","type":"Shape","x":758,"y":258,"scale":{"width":100,"height":100},"selected":false,"fill":"#ee772b"},{"markup":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 571.11 571.11\" preserveAspectRatio=\"none\"><path d=\"M535.441,412.339A280.868,280.868 0 1,1 536.186,161.733L284.493,286.29Z\"\/><\/svg>","type":"Shape","x":621,"y":489,"scale":{"width":100,"height":100},"selected":false,"fill":"#d6ee2b"}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":6,"selected":false,"active":false,"x":593,"y":403},{"components":[{"TextBox":{},"x":51,"y":293,"scale":{"x":1,"y":1},"type":"TextBox","text":"Couleur du fond de la slide<br>","size":81,"selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":7,"selected":false,"active":false,"x":1623,"y":683,"background":"bg-solid-salmon"},{"components":[{"TextBox":{},"x":32,"y":237,"scale":{"x":1,"y":1},"type":"TextBox","size":96,"text":"Couleur de&nbsp; la surface<br>","selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":8,"selected":false,"active":false,"surface":"bg-surf-grad-grass","x":1445,"y":391},{"components":[{"TextBox":{},"x":176,"y":56,"scale":{"x":1,"y":1},"type":"TextBox","size":96,"text":"Des transitions<br>","selected":false},{"TextBox":{},"x":351,"y":668,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>Vous avez d\u00fb en voir suffisemment ;)<br><\/i>","selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":9,"selected":false,"active":false,"x":2700,"y":460},{"components":[{"TextBox":{},"x":73,"y":62,"scale":{"x":1,"y":1},"type":"TextBox","size":48,"text":"Fonctions d'\u00e9dition suppl\u00e9mentaires :<br>","selected":false},{"TextBox":{},"x":119,"y":165,"scale":{"x":1,"y":1},"type":"TextBox","size":43,"text":"<ul><li>S\u00e9lection multiple d'\u00e9lements<br><\/li><li><font color=\"#000000\" face=\"Lato\">Copi\u00e9\/coll\u00e9<\/font><\/li><li><font color=\"#000000\" face=\"Lato\">Annuler\/refaire<\/font><\/li><li><font color=\"#000000\" face=\"Lato\">Raccourcis clavier<br><\/font><\/li><\/ul>","selected":false,"skewX":0}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":10,"selected":false,"active":false,"x":2980,"y":460},{"components":[{"TextBox":{},"x":62,"y":1,"scale":{"x":1,"y":1},"type":"TextBox","size":74,"text":"Gestion des pr\u00e9sentations<br>","selected":false},{"TextBox":{},"x":35,"y":254,"scale":{"x":1,"y":1},"type":"TextBox","size":23,"text":"<ul><li>Ajout\/suppression<\/li><\/ul>","selected":false},{"TextBox":{},"x":35,"y":371,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li>Marquer comme mod\u00e8le <br><\/li><\/ul>","selected":false},{"TextBox":{},"x":60,"y":409,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>La pr\u00e9sentation sera utilisable comme base pour d'autres pr\u00e9sentations<\/i>","selected":false},{"TextBox":{},"x":37,"y":452,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li>Marquer comme mod\u00e8le public<\/li><\/ul>","selected":false},{"TextBox":{},"x":62,"y":486,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>La pr\u00e9sentation sera utilisable comme base par tout le monde<\/i><br>","selected":false},{"TextBox":{},"x":37,"y":530,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li>Publier la pr\u00e9sentation par lien public<br><\/li><\/ul>","selected":false},{"TextBox":{},"x":62,"y":565,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>La pr\u00e9sentation sera visible par tous ceux ayant acc\u00e8s au lien g\u00e9n\u00e9r\u00e9. De plus, les utilisateurs de Framaslides ayant acc\u00e8s au lien pourront utiliser cette pr\u00e9sentation comme base.<br><\/i>","selected":false},{"TextBox":{},"x":36,"y":297,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li><font face=\"Lato\">Gestion des versions<br><\/font><\/li><\/ul>","selected":false},{"TextBox":{},"x":61,"y":330,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>Possibilit\u00e9 de lister les versions, de les restaurer et de des supprimer<\/i><br>","selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":11,"selected":true,"active":true,"x":3260,"y":460},{"components":[{"TextBox":{},"x":138,"y":113,"scale":{"x":1,"y":1},"type":"TextBox","text":"Merci d'avoir suivi cette pr\u00e9sentation jusqu'au bout !<br>","size":33,"selected":false},{"src":"https:\/\/framaslides.org\/picture\/585290dc7ca547.83931230","type":"Image","x":205,"y":258,"scale":{"x":0.5947265625,"y":0.5947265625,"width":609,"height":403.224609375},"imageType":"83931230","selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":12,"selected":false,"active":false,"x":1096,"y":782}],"customBackgrounds":{"bgs":[]},"exists":true,"activeSlide":{"components":[{"TextBox":{},"x":62,"y":1,"scale":{"x":1,"y":1},"type":"TextBox","size":74,"text":"Gestion des pr\u00e9sentations<br>","selected":false},{"TextBox":{},"x":35,"y":254,"scale":{"x":1,"y":1},"type":"TextBox","size":23,"text":"<ul><li>Ajout\/suppression<\/li><\/ul>","selected":false},{"TextBox":{},"x":35,"y":371,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li>Marquer comme mod\u00e8le <br><\/li><\/ul>","selected":false},{"TextBox":{},"x":60,"y":409,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>La pr\u00e9sentation sera utilisable comme base pour d'autres pr\u00e9sentations<\/i>","selected":false},{"TextBox":{},"x":37,"y":452,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li>Marquer comme mod\u00e8le public<\/li><\/ul>","selected":false},{"TextBox":{},"x":62,"y":486,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>La pr\u00e9sentation sera utilisable comme base par tout le monde<\/i><br>","selected":false},{"TextBox":{},"x":37,"y":530,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li>Publier la pr\u00e9sentation par lien public<br><\/li><\/ul>","selected":false},{"TextBox":{},"x":62,"y":565,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>La pr\u00e9sentation sera visible par tous ceux ayant acc\u00e8s au lien g\u00e9n\u00e9r\u00e9. De plus, les utilisateurs de Framaslides ayant acc\u00e8s au lien pourront utiliser cette pr\u00e9sentation comme base.<br><\/i>","selected":false},{"TextBox":{},"x":36,"y":297,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<ul><li><font face=\"Lato\">Gestion des versions<br><\/font><\/li><\/ul>","selected":false},{"TextBox":{},"x":61,"y":330,"scale":{"x":1,"y":1},"type":"TextBox","size":24,"text":"<i>Possibilit\u00e9 de lister les versions, de les restaurer et de des supprimer<\/i><br>","selected":false}],"z":0,"impScale":3,"rotateX":0,"rotateY":0,"rotateZ":0,"index":11,"selected":true,"active":true,"x":3260,"y":460},"fileName":"Tuto framaslides","deckVersion":"1.0","overviewX":1743,"overviewY":454.5}
\ No newline at end of file
<?php
namespace Strut\StrutBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Strut\StrutBundle\Entity\Config;
use Strut\UserBundle\Entity\User;
class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface
{
/**
* {@inheritdoc}
*/
public function load(ObjectManager $manager)
{
/** @var User $admin */
$admin = $this->getReference('admin-user');
/** @var Config $adminConfig */
$adminConfig = new Config($admin);
$adminConfig->setLanguage('en');
$adminConfig->setListMode(0);
$manager->persist($adminConfig);
$admin->setConfig($adminConfig);
$manager->persist($admin);
$this->addReference('admin-config', $adminConfig);
/** @var User $bob */
$bob = $this->getReference('bob-user');
$bobConfig = new Config($bob);
$bobConfig->setLanguage('fr');
$bobConfig->setListMode(1);
$manager->persist($bobConfig);
$bob->setConfig($bobConfig);
$manager->persist($bob);
$this->addReference('bob-config', $bobConfig);
/** @var User $empty */
$empty = $this->getReference('empty-user');
$emptyConfig = new Config($empty);
$emptyConfig->setLanguage('en');
$emptyConfig->setListMode(0);
$manager->persist($emptyConfig);
$empty->setConfig($bobConfig);
$manager->persist($empty);
$this->addReference('empty-config', $emptyConfig);
$manager->flush();
}
/**
* {@inheritdoc}
*/
public function getOrder()
{
return 20;
}
}
<?php
namespace Wallabag\CoreBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Strut\StrutBundle\Entity\Presentation;
use Strut\StrutBundle\Entity\Version;
use Strut\UserBundle\Entity\User;
class LoadPresentationData extends AbstractFixture implements OrderedFixtureInterface
{
/**
* {@inheritdoc}
*/
public function load(ObjectManager $manager)
{
/** @var User $admin */
$admin = $this->getReference('admin-user');
$presentation = new Presentation($admin);
$presentation->setTitle('Test');
$manager->persist($presentation);
$version = new Version($presentation);
$framaslidesFile = file_get_contents(__DIR__ . '/../Content/TutoFramaslides.json');
$version->setContent($framaslidesFile);
$manager->persist($version);
$presentation->addVersion($version);
$manager->persist($presentation);
$manager->flush();
}
/**
* {@inheritdoc}
*/
public function getOrder()
{