- Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
- Opcional: Si usamos Fetch API en el proyecto:
<div class="modal__container"> | |
<div class="modal"> | |
<div class="modal__form__container"> | |
<form action="" class="form"> | |
<h2>Donate</h2> | |
<div class="form__step__container"> | |
<div class="form__step"> | |
<h3>Step 1</h3> | |
<h4>Choose the amount</h4> | |
<div class="donation-boxes"> |
<div class="modal__container"> | |
<div class="modal"> | |
<div class="modal__form__container"> | |
<form action="" class="form"> | |
<h2>Donate</h2> | |
<div class="form__step__container"> | |
<div class="form__step"> | |
<h3>Step 1</h3> | |
<h4>Choose the amount</h4> | |
<div class="donation-boxes"> |
<?php | |
$xml = simplexml_load_file('test.xml'); | |
$ns = $xml->getNamespaces(true); | |
$xml->registerXPathNamespace('c', $ns['cfdi']); | |
$xml->registerXPathNamespace('t', $ns['tfd']); | |
//EMPIEZO A LEER LA INFORMACION DEL CFDI E IMPRIMIRLA | |
foreach ($xml->xpath('//cfdi:Comprobante') as $cfdiComprobante){ | |
echo $cfdiComprobante['version']; |